diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-07-04 21:11:28 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-07-04 21:11:28 +0300 |
commit | 8dd47e51d9c318e522b21f28bc3e3935ef692056 (patch) | |
tree | 30b364f3f1b04fd31efec47332d193567894997f /src/particle.cpp | |
parent | d1d205fbe0c2d63bbd08742c56f00852ccc0523b (diff) | |
download | ManaVerse-8dd47e51d9c318e522b21f28bc3e3935ef692056.tar.gz ManaVerse-8dd47e51d9c318e522b21f28bc3e3935ef692056.tar.bz2 ManaVerse-8dd47e51d9c318e522b21f28bc3e3935ef692056.tar.xz ManaVerse-8dd47e51d9c318e522b21f28bc3e3935ef692056.zip |
add missing checks.
also fix crash in creating character with broken data.
Diffstat (limited to 'src/particle.cpp')
-rw-r--r-- | src/particle.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/particle.cpp b/src/particle.cpp index 9ec83afb6..6e8ab14a7 100644 --- a/src/particle.cpp +++ b/src/particle.cpp @@ -205,7 +205,8 @@ bool Particle::update() } // Update child emitters - if ((mLifetimePast - 1) % Particle::emitterSkip == 0) + if (Particle::emitterSkip && (mLifetimePast - 1) + % Particle::emitterSkip == 0) { FOR_EACH (EmitterConstIterator, e, mChildEmitters) { |