summaryrefslogtreecommitdiff
path: root/src/localplayer.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/localplayer.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/localplayer.cpp')
-rw-r--r--src/localplayer.cpp11
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();
}