summaryrefslogtreecommitdiff
path: root/src/monster.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2008-10-14 21:04:46 +0000
committerIra Rice <irarice@gmail.com>2008-10-14 21:04:46 +0000
commitdc3c5d595e60a8498e44affb8ec05b91709d34fc (patch)
tree15dabb6da28bb2f30694f761cb301e2b8b312576 /src/monster.cpp
parentfc8760599dfd730d416bb2c646e17c5dd7dd132e (diff)
downloadmana-dc3c5d595e60a8498e44affb8ec05b91709d34fc.tar.gz
mana-dc3c5d595e60a8498e44affb8ec05b91709d34fc.tar.bz2
mana-dc3c5d595e60a8498e44affb8ec05b91709d34fc.tar.xz
mana-dc3c5d595e60a8498e44affb8ec05b91709d34fc.zip
Early addition of a particle effect disabling option. Would like to
change this in the future to update instantaneously.
Diffstat (limited to 'src/monster.cpp')
-rw-r--r--src/monster.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/monster.cpp b/src/monster.cpp
index 61f1f5c3..be22bed3 100644
--- a/src/monster.cpp
+++ b/src/monster.cpp
@@ -65,13 +65,15 @@ Monster::Monster(Uint32 id, Uint16 job, Map *map):
mSprites[c] = AnimatedSprite::load("graphics/sprites/error.xml");
}
- const std::list<std::string> &particleEffects = info.getParticleEffects();
- for ( std::list<std::string>::const_iterator i = particleEffects.begin();
- i != particleEffects.end();
- i++
- )
+ if (mParticleEffects)
{
- controlParticle(particleEngine->addEffect((*i), 0, 0));
+ const std::list<std::string> &particleEffects = info.getParticleEffects();
+ for ( std::list<std::string>::const_iterator i = particleEffects.begin();
+ i != particleEffects.end(); i++
+ )
+ {
+ controlParticle(particleEngine->addEffect((*i), 0, 0));
+ }
}
}
@@ -122,7 +124,7 @@ void Monster::setAction(Action action)
//attack particle effect
particleEffect = getInfo().getAttackParticleEffect();
- if (particleEffect != "")
+ if (particleEffect != "" && mParticleEffects)
{
switch (mDirection)
{