aboutsummaryrefslogtreecommitdiff
path: root/engines/lure/hotspots.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2007-11-13 08:47:25 +0000
committerPaul Gilbert2007-11-13 08:47:25 +0000
commit3d796f4b53ab7bc34fa912855a7eb9ea62f65e51 (patch)
treebd4f00d1d791121689d64fdfb09c53ae83614dc3 /engines/lure/hotspots.cpp
parent05b5a493f85350ec5df86dc95045fee6e193ed27 (diff)
downloadscummvm-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
Diffstat (limited to 'engines/lure/hotspots.cpp')
-rw-r--r--engines/lure/hotspots.cpp8
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 {