mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 15:15:31 +00:00
Fix water ripples
This commit is contained in:
parent
57b7cac13f
commit
9bc6f2d5f6
1 changed files with 2 additions and 1 deletions
|
@ -127,7 +127,6 @@ void RippleSimulation::update(float dt)
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::Vec3f currentPos (it->mPtr.getRefData().getPosition().asVec3());
|
osg::Vec3f currentPos (it->mPtr.getRefData().getPosition().asVec3());
|
||||||
currentPos.z() = 0; // Z is set by the Scene Node
|
|
||||||
|
|
||||||
if ( (currentPos - it->mLastEmitPosition).length() > 10
|
if ( (currentPos - it->mLastEmitPosition).length() > 10
|
||||||
// Only emit when close to the water surface, not above it and not too deep in the water
|
// 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;
|
it->mLastEmitPosition = currentPos;
|
||||||
|
|
||||||
|
currentPos.z() = mParticleNode->getPosition().z();
|
||||||
|
|
||||||
if (mParticleSystem->numParticles()-mParticleSystem->numDeadParticles() > 500)
|
if (mParticleSystem->numParticles()-mParticleSystem->numDeadParticles() > 500)
|
||||||
continue; // TODO: remove the oldest particle to make room?
|
continue; // TODO: remove the oldest particle to make room?
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue