summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorBertram <bertram@cegetel.net>2009-10-22 01:18:41 +0200
committerBertram <bertram@cegetel.net>2009-10-22 01:18:41 +0200
commit4720134d58cd5fe0846ed911b360ed75641cb874 (patch)
tree3ac3292f26a30971f424bdbd794f4daf3159adfe /src/localplayer.cpp
parentc36ab53b35e336e21fce5943d7d609ea02f8cea9 (diff)
downloadmana-4720134d58cd5fe0846ed911b360ed75641cb874.tar.gz
mana-4720134d58cd5fe0846ed911b360ed75641cb874.tar.bz2
mana-4720134d58cd5fe0846ed911b360ed75641cb874.tar.xz
mana-4720134d58cd5fe0846ed911b360ed75641cb874.zip
Fix flipping player's direction when using keyboard to walk diagonally.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 78988aa1..42da1bf9 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -302,7 +302,7 @@ void LocalPlayer::nextStep(unsigned char dir = 0)
const Vector &pos = getPosition();
- // Compute where the next step will set.
+ // Compute where the next step will be set.
int dx = 0, dy = 0;
if (dir & UP)
@@ -342,7 +342,7 @@ void LocalPlayer::nextStep(unsigned char dir = 0)
}
}
- if (dScaler >= 0)
+ if (dScaler > 0)
{
//effectManager->trigger(15, (int) pos.x + (dx * dScaler), (int) pos.y + (dy * dScaler));
setDestination((int) pos.x + (dx * dScaler), (int) pos.y + (dy * dScaler));