summaryrefslogtreecommitdiff
path: root/src/particle.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-07-04 21:11:28 +0300
committerAndrei Karas <akaras@inbox.ru>2013-07-04 21:11:28 +0300
commit8dd47e51d9c318e522b21f28bc3e3935ef692056 (patch)
tree30b364f3f1b04fd31efec47332d193567894997f /src/particle.cpp
parentd1d205fbe0c2d63bbd08742c56f00852ccc0523b (diff)
downloadmanaverse-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.cpp3
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)
{