diff options
Diffstat (limited to 'src/particle')
-rw-r--r-- | src/particle/particle.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/particle/particle.cpp b/src/particle/particle.cpp index 4bf01207c..eb2456306 100644 --- a/src/particle/particle.cpp +++ b/src/particle/particle.cpp @@ -42,6 +42,7 @@ #include "utils/delete2.h" #include "utils/dtor.h" #include "utils/mathutils.h" +#include "utils/mrand.h" #include "debug.h" @@ -161,11 +162,11 @@ void Particle::updateSelf() restrict2 if (mRandomness >= 10) // reduce useless calculations { const int rand2 = mRandomness * 2; - mVelocity.x += static_cast<float>(std::rand() % rand2 - mRandomness) + mVelocity.x += static_cast<float>(mrand() % rand2 - mRandomness) / 1000.0F; - mVelocity.y += static_cast<float>(std::rand() % rand2 - mRandomness) + mVelocity.y += static_cast<float>(mrand() % rand2 - mRandomness) / 1000.0F; - mVelocity.z += static_cast<float>(std::rand() % rand2 - mRandomness) + mVelocity.z += static_cast<float>(mrand() % rand2 - mRandomness) / 1000.0F; } |