summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorChuck Miller <shadowmil@gmail.com>2010-03-31 23:51:16 -0400
committerChuck Miller <shadowmil@gmail.com>2010-03-31 23:52:52 -0400
commit2bddef7af2e1fd01186188947fb685a47b228e3c (patch)
treef625d3a05df8b3bdabb52fdfaf6cfb1aa40d84b7 /src/being.cpp
parent9a877ff9180f219e868884f9ef59a6e8cb7a8934 (diff)
downloadmana-client-2bddef7af2e1fd01186188947fb685a47b228e3c.tar.gz
mana-client-2bddef7af2e1fd01186188947fb685a47b228e3c.tar.bz2
mana-client-2bddef7af2e1fd01186188947fb685a47b228e3c.tar.xz
mana-client-2bddef7af2e1fd01186188947fb685a47b228e3c.zip
A hack to prevent NPCs from walking off screen on ManaServ
This should really be fixed a different way, but until I find the cause of the issue, this will have to hold.
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp4
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;