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/localplayer.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/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 72e2a369..74924b1d 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -54,20 +54,15 @@ void LocalPlayer::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(); attack(); } |