diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2006-08-27 15:54:32 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2006-08-27 15:54:32 +0000 |
commit | 8ca48faeb472bb6645ec18c7b2e0480e8e20435e (patch) | |
tree | bbb93c24c6b3c27891890820d20cd75b39e1fe7a /src/player.cpp | |
parent | 97cdacdaf3cfa0970597483d41838906125886bc (diff) | |
download | mana-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.cpp | 11 |
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; |