diff options
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 74924b1d..368bc8e3 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -52,21 +52,9 @@ LocalPlayer::~LocalPlayer() void LocalPlayer::logic() { - switch (mAction) { - case WALK: - if (get_elapsed_time(mWalkTime) >= mWalkSpeed) - { - nextStep(); - } - break; - - case ATTACK: - if (get_elapsed_time(mWalkTime) >= mAttackSpeed) - { - nextStep(); - attack(); - } - break; + if (mAction == ATTACK && get_elapsed_time(mWalkTime) >= mAttackSpeed) + { + attack(); } // Actions are allowed once per second |