1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-29 21:45:32 +00:00

Fix water ripples

This commit is contained in:
scrawl 2015-12-09 20:35:51 +01:00
parent 57b7cac13f
commit 9bc6f2d5f6

View file

@ -127,7 +127,6 @@ void RippleSimulation::update(float dt)
}
osg::Vec3f currentPos (it->mPtr.getRefData().getPosition().asVec3());
currentPos.z() = 0; // Z is set by the Scene Node
if ( (currentPos - it->mLastEmitPosition).length() > 10
// Only emit when close to the water surface, not above it and not too deep in the water
@ -136,6 +135,8 @@ void RippleSimulation::update(float dt)
{
it->mLastEmitPosition = currentPos;
currentPos.z() = mParticleNode->getPosition().z();
if (mParticleSystem->numParticles()-mParticleSystem->numDeadParticles() > 500)
continue; // TODO: remove the oldest particle to make room?