summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
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 6046459c..14b32415 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -519,7 +519,6 @@ void LocalPlayer::walk(unsigned char dir)
#ifdef TMWSERV_SUPPORT
const Vector &pos = getPosition();
- int dScaler; // Distance to walk
#endif
if (mAction == WALK && !mPath.empty())
@@ -554,7 +553,6 @@ void LocalPlayer::walk(unsigned char dir)
dx++;
#endif
-
// Prevent skipping corners over colliding tiles
#ifdef TMWSERV_SUPPORT
if (dx && !mMap->getWalk(((int) pos.x + dx) / 32,
@@ -576,6 +574,8 @@ void LocalPlayer::walk(unsigned char dir)
(pos.y + dy) / 32, getWalkMask()))
dx = 16 - (int) pos.x % 32;
+ int dScaler; // Distance to walk
+
// Checks our path up to 5 tiles, if a blocking tile is found
// We go to the last good tile, and break out of the loop
for (dScaler = 1; dScaler <= 10; dScaler++)