summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 339435a5..8b601326 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -210,6 +210,9 @@ void LocalPlayer::walk(unsigned char dir)
{
// Update the player direction to where he wants to walk
// Warning: Not communicated to the server yet
+
+ // If the being can't move, just change direction
+ mDirection = dir;
setDirection(dir);
}
}
@@ -344,7 +347,10 @@ void LocalPlayer::attack(Being *target, bool keep)
if (abs(dist_y) >= abs(dist_x))
{
if (dist_y > 0)
+ {
setDirection(DOWN);
+ printf("DOWN\n");
+ }
else
setDirection(UP);
}