diff options
author | Paul Gilbert | 2010-10-13 10:12:35 +0000 |
---|---|---|
committer | Paul Gilbert | 2010-10-13 10:12:35 +0000 |
commit | 655e4a961af0bd21b30ec3162b230ed387c1df21 (patch) | |
tree | cf5acb8230cd6cf71cd1f21ff3ca9aaf39eff113 | |
parent | c0e2f1c6f8f7df66ae6c090f6c16aea14ebe8bf3 (diff) | |
download | scummvm-rg350-655e4a961af0bd21b30ec3162b230ed387c1df21.tar.gz scummvm-rg350-655e4a961af0bd21b30ec3162b230ed387c1df21.tar.bz2 scummvm-rg350-655e4a961af0bd21b30ec3162b230ed387c1df21.zip |
LURE: Bugfix for characters getting stuck in Abbey doorway
svn-id: r53402
-rw-r--r-- | engines/lure/hotspots.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp index 30b6f840fc..64e5035ee9 100644 --- a/engines/lure/hotspots.cpp +++ b/engines/lure/hotspots.cpp @@ -4170,6 +4170,7 @@ PathFinderResult PathFinder::process() { _inProgress = true; initVars(); + Common::Point diff(_destX - _xCurrent, _destY - _yCurrent); _xCurrent >>= 3; _yCurrent >>= 3; _xDestCurrent >>= 3; _yDestCurrent >>= 3; if ((_xCurrent == _xDestCurrent) && (_yCurrent == _yDestCurrent)) { @@ -4178,6 +4179,10 @@ PathFinderResult PathFinder::process() { add(RIGHT, _xDestPos); else if (_xDestPos < 0) add(LEFT, -_xDestPos); + else if (diff.y > 0) + add(DOWN, diff.y); + else + add(UP, -diff.y); _inProgress = false; result = PF_OK; @@ -4353,7 +4358,7 @@ PathFinderResult PathFinder::process() { break; } - // Add a final move if necessary + // Add final movement if necessary if (result == PF_OK) { if (_xDestPos < 0) |