summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-04-08 20:40:13 +0300
committerAndrei Karas <akaras@inbox.ru>2015-04-08 23:17:42 +0300
commit877bfe276efcf663de5a8af8fa9464aaf935ca2d (patch)
treed00a91bae411640ca57b8cf7b8b2559a2fc4c36c /src/being
parent894af147511679d9db979b8169540c3e922ce375 (diff)
downloadmanaverse-877bfe276efcf663de5a8af8fa9464aaf935ca2d.tar.gz
manaverse-877bfe276efcf663de5a8af8fa9464aaf935ca2d.tar.bz2
manaverse-877bfe276efcf663de5a8af8fa9464aaf935ca2d.tar.xz
manaverse-877bfe276efcf663de5a8af8fa9464aaf935ca2d.zip
Simplify using rotational particle effect.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/being.cpp24
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;