diff options
author | Paul Gilbert | 2007-11-13 08:47:25 +0000 |
---|---|---|
committer | Paul Gilbert | 2007-11-13 08:47:25 +0000 |
commit | 3d796f4b53ab7bc34fa912855a7eb9ea62f65e51 (patch) | |
tree | bd4f00d1d791121689d64fdfb09c53ae83614dc3 | |
parent | 05b5a493f85350ec5df86dc95045fee6e193ed27 (diff) | |
download | scummvm-rg350-3d796f4b53ab7bc34fa912855a7eb9ea62f65e51.tar.gz scummvm-rg350-3d796f4b53ab7bc34fa912855a7eb9ea62f65e51.tar.bz2 scummvm-rg350-3d796f4b53ab7bc34fa912855a7eb9ea62f65e51.zip |
Tweak to object walk to position calculations - NPCs will no longer get stuck in doors they close
svn-id: r29489
-rw-r--r-- | engines/lure/hotspots.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp index e6a6171677..9ccaaafc8b 100644 --- a/engines/lure/hotspots.cpp +++ b/engines/lure/hotspots.cpp @@ -1071,11 +1071,9 @@ bool Hotspot::characterWalkingCheck(HotspotData *hotspot) { _walkFlag = true; if ((hotspot->walkY & 0x8000) != 0) { - // Special handling for walking -// if (((xp >> 3) != (x() >> 3)) || -// ((((y() + heightCopy()) >> 3) - 1) != (yp >> 3))) { - if ((ABS(xp - x()) > 8) || - (ABS(yp - (y() + heightCopy())) > 8)) { + if (((x() >> 3) != (xp >> 3)) || + ((((y() + heightCopy()) >> 3) - 1) != (yp >> 3))) { + // Walk to the specified destination walkTo(xp, yp); return true; } else { |