summaryrefslogtreecommitdiff
path: root/src/player.cpp
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2006-08-27 15:54:32 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2006-08-27 15:54:32 +0000
commit8ca48faeb472bb6645ec18c7b2e0480e8e20435e (patch)
treebbb93c24c6b3c27891890820d20cd75b39e1fe7a /src/player.cpp
parent97cdacdaf3cfa0970597483d41838906125886bc (diff)
downloadmana-8ca48faeb472bb6645ec18c7b2e0480e8e20435e.tar.gz
mana-8ca48faeb472bb6645ec18c7b2e0480e8e20435e.tar.bz2
mana-8ca48faeb472bb6645ec18c7b2e0480e8e20435e.tar.xz
mana-8ca48faeb472bb6645ec18c7b2e0480e8e20435e.zip
Removed Being::mFrame field.
Diffstat (limited to 'src/player.cpp')
-rw-r--r--src/player.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/player.cpp b/src/player.cpp
index 46d3b938..52f2cdb0 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -47,19 +47,14 @@ Player::logic()
{
switch (mAction) {
case WALK:
- mFrame = (get_elapsed_time(mWalkTime) * 6) / mWalkSpeed;
- if (mFrame >= 6) {
+ if (get_elapsed_time(mWalkTime) >= mWalkSpeed)
+ {
nextStep();
}
break;
case ATTACK:
- int frames = 4;
- if (getWeapon() == 2)
+ if (get_elapsed_time(mWalkTime) >= mAttackSpeed)
{
- frames = 5;
- }
- mFrame = (get_elapsed_time(mWalkTime) * frames) / mAttackSpeed;
- if (mFrame >= frames) {
nextStep();
}
break;