summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 43cf0069..e10fd3d6 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -54,15 +54,20 @@ void LocalPlayer::logic()
{
switch (action) {
case WALK:
- mFrame = (get_elapsed_time(walk_time) * 4) / mWalkSpeed;
- if (mFrame >= 4) {
+ mFrame = (get_elapsed_time(walk_time) * 6) / mWalkSpeed;
+ if (mFrame >= 6) {
nextStep();
}
break;
case ATTACK:
- mFrame = (get_elapsed_time(walk_time) * 4) / aspd;
- if (mFrame >= 4) {
+ int frames = 4;
+ if (getWeapon() == 2)
+ {
+ frames = 5;
+ }
+ mFrame = (get_elapsed_time(walk_time) * frames) / aspd;
+ if (mFrame >= frames) {
nextStep();
attack();
}