diff options
-rw-r--r-- | src/being.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/being.cpp b/src/being.cpp index 72bdef3d..1d9047d1 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -590,6 +590,10 @@ void Being::logic() mDest : Vector(mPath.front().x, mPath.front().y); + // This is a hack that stops NPCs from running off the map... + if (mDest.x <= 0 && mDest.y <= 0) + return; + // The Vector representing the difference between current position // and the next destination path node. Vector dir = dest - mPos; |