mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-12 13:13:27 +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
@ -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…
x
Reference in New Issue
Block a user