summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-08 02:17:29 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-08 02:17:29 +0300
commit85fbff517d7f2bd6a6e26037266702bd2e16e1e9 (patch)
tree16a3de233fbd4ef2a12cb864a22393cc9e8128be
parentdbc3b324a0c5dcb1a0ee29b289e71423a06e85fd (diff)
downloadmanaplus-85fbff517d7f2bd6a6e26037266702bd2e16e1e9.tar.gz
manaplus-85fbff517d7f2bd6a6e26037266702bd2e16e1e9.tar.bz2
manaplus-85fbff517d7f2bd6a6e26037266702bd2e16e1e9.tar.xz
manaplus-85fbff517d7f2bd6a6e26037266702bd2e16e1e9.zip
Revert "Add hurt animation."
This reverts commit 9875c00dc37b1d7b55e1154075a0cd2d997a490d.
-rw-r--r--src/being.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 9aee21c4e..13874335d 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -740,12 +740,8 @@ void Being::handleAttack(Being *victim, int damage,
if (dir)
setDirection(dir);
}
- if (damage)
- {
- victim->setAction(HURT);
- if (this == player_node && mAction == HURT)
- setAction(ATTACK);
- }
+ if (damage && victim->mType == PLAYER && victim->mAction == SIT)
+ victim->setAction(STAND);
sound.playSfx(mInfo->getSound((damage > 0) ?
SOUND_EVENT_HIT : SOUND_EVENT_MISS), mX, mY);
@@ -1093,7 +1089,10 @@ void Being::setAction(Action action, int attackType A_UNUSED)
case HURT:
if (mInfo)
sound.playSfx(mInfo->getSound(SOUND_EVENT_HURT), mX, mY);
- currentAction = SpriteAction::HURT;
+ //currentAction = SpriteAction::HURT;// Buggy: makes the player stop
+ // attacking and unable to attack
+ // again until he moves.
+ // TODO: fix this!
break;
case DEAD:
currentAction = SpriteAction::DEAD;