diff options
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 684c21e1..e7f03589 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -390,7 +390,9 @@ void LocalPlayer::nextTile(unsigned char dir = 0) { refPosition = Position((int) pos.x + (dx * dScaler) / 32, (int) pos.y + (dy * dScaler) / 32); - testPosition = checkNodeOffsets(refPosition); + testPosition = mMap->checkNodeOffsets(getWidth() / 2, + getWalkMask(), + refPosition); if (refPosition.x != testPosition.x || refPosition.y != testPosition.y) { @@ -403,7 +405,9 @@ void LocalPlayer::nextTile(unsigned char dir = 0) // Test also current position to avoid being blocked on corners // in certain situations. Position currentPosition((int) pos.x, (int) pos.y); - Position testPosition = checkNodeOffsets(currentPosition); + Position testPosition = mMap->checkNodeOffsets(getWidth() / 2, + getWalkMask(), + currentPosition); if (dScaler > 0) { setDestination((int) pos.x + (dx * dScaler), |