mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
Merge pull request #2959 from elsid/fix_particle_tsan
Fix TSAN warnings for ripples emitter (bug #4764)
This commit is contained in:
commit
9124a18bb6
1 changed files with 1 additions and 0 deletions
|
@ -200,6 +200,7 @@ void RippleSimulation::emitRipple(const osg::Vec3f &pos)
|
|||
{
|
||||
if (std::abs(pos.z() - mParticleNode->getPosition().z()) < 20)
|
||||
{
|
||||
osgParticle::ParticleSystem::ScopedWriteLock lock(*mParticleSystem->getReadWriteMutex());
|
||||
osgParticle::Particle* p = mParticleSystem->createParticle(nullptr);
|
||||
p->setPosition(osg::Vec3f(pos.x(), pos.y(), 0.f));
|
||||
p->setAngle(osg::Vec3f(0,0, Misc::Rng::rollProbability() * osg::PI * 2 - osg::PI));
|
||||
|
|
Loading…
Reference in a new issue