Fix water ripples

openmw-38
scrawl 9 years ago
parent 57b7cac13f
commit 9bc6f2d5f6

@ -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?

Loading…
Cancel
Save