Commit 6ab19967 authored by hybrid's avatar hybrid

Fix rand value of radius to float value (range 0..1) instead of integer rand...

Fix rand value of radius to float value (range 0..1) instead of integer rand (which gives values up to some million). Bug found by tmyke

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3609 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 418b8618
...@@ -59,7 +59,7 @@ s32 CParticleSphereEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& ou ...@@ -59,7 +59,7 @@ s32 CParticleSphereEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& ou
for(u32 i=0; i<amount; ++i) for(u32 i=0; i<amount; ++i)
{ {
// Random distance from center // Random distance from center
const f32 distance = os::Randomizer::rand() * Radius; const f32 distance = os::Randomizer::frand() * Radius;
// Random direction from center // Random direction from center
p.pos.set(Center + distance); p.pos.set(Center + distance);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment