summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2006-07-20 11:41:32 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2006-07-20 11:41:32 +0000
commitab3871e98d7fe2f69f0ab99c066f8c7040014731 (patch)
tree30b0d9b316ca702df73d43675fd240a735da9e6a /src/being.cpp
parentb9d581cf5f7c1439f391d3f4906308f9e40d8012 (diff)
downloadmana-client-ab3871e98d7fe2f69f0ab99c066f8c7040014731.tar.gz
mana-client-ab3871e98d7fe2f69f0ab99c066f8c7040014731.tar.bz2
mana-client-ab3871e98d7fe2f69f0ab99c066f8c7040014731.tar.xz
mana-client-ab3871e98d7fe2f69f0ab99c066f8c7040014731.zip
Fixed left bow attack animation, made the attack animation stay in sync with attack speed.
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 19d9d916..d34ea43e 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -221,7 +221,19 @@ Being::setAction(Action action)
for (int i = 0; i < VECTOREND_SPRITE; i++)
{
- if (mSprites[i] != NULL) mSprites[i]->play(currentAction);
+ if (mSprites[i] != NULL)
+ {
+ if (currentAction == "attack" ||
+ currentAction == "attack_stab" ||
+ currentAction == "attack_bow")
+ {
+ mSprites[i]->play(currentAction, mAttackSpeed);
+ }
+ else
+ {
+ mSprites[i]->play(currentAction);
+ }
+ }
}
}
mAction = action;
@@ -317,7 +329,6 @@ Being::logic()
{
if (mSprites[i] != NULL)
{
- printf("Draw: %i\n", i);
mSprites[i]->update(tick_time * 10);
}
}
@@ -338,7 +349,6 @@ Being::draw(Graphics *graphics, int offsetX, int offsetY)
if (mSprites[i] != NULL)
{
mSprites[i]->draw(graphics, px, py);
- printf("Draw: %i\n", i);
}
}
}