summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/localplayer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index e17cf09c4..5aea98fbb 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -3413,6 +3413,9 @@ int LocalPlayer::getPathLength(Being* being)
const Vector &playerPos = getPosition();
+ if (being->mX == mX && being->mY == mY)
+ return 0;
+
Path debugPath = mMap->findPath(
static_cast<int>(playerPos.x - 16) / 32,
static_cast<int>(playerPos.y - 32) / 32,