diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-04-08 20:40:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-04-08 23:17:42 +0300 |
commit | 877bfe276efcf663de5a8af8fa9464aaf935ca2d (patch) | |
tree | d00a91bae411640ca57b8cf7b8b2559a2fc4c36c /src/being/being.cpp | |
parent | 894af147511679d9db979b8169540c3e922ce375 (diff) | |
download | plus-877bfe276efcf663de5a8af8fa9464aaf935ca2d.tar.gz plus-877bfe276efcf663de5a8af8fa9464aaf935ca2d.tar.bz2 plus-877bfe276efcf663de5a8af8fa9464aaf935ca2d.tar.xz plus-877bfe276efcf663de5a8af8fa9464aaf935ca2d.zip |
Simplify using rotational particle effect.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r-- | src/being/being.cpp | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index e37d29fd1..93dd6abc5 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -1245,29 +1245,15 @@ void Being::setAction(const BeingAction::Action &action, const int attackId) reset(); // attack particle effect - if (Particle::enabled) + if (Particle::enabled && effectManager) { const int effectId = mInfo->getAttack(attackId)->mEffectId; - - int rotation; - switch (mSpriteDirection) + if (effectId >= 0) { - case SpriteDirection::DOWN: - default: - rotation = 0; - break; - case SpriteDirection::LEFT: - rotation = 90; - break; - case SpriteDirection::UP: - rotation = 180; - break; - case SpriteDirection::RIGHT: - rotation = 270; - break; + effectManager->triggerDirection(effectId, + this, + mSpriteDirection); } - if (effectManager && effectId >= 0) - effectManager->trigger(effectId, this, rotation); } } break; |