From 655e4a961af0bd21b30ec3162b230ed387c1df21 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 13 Oct 2010 10:12:35 +0000 Subject: LURE: Bugfix for characters getting stuck in Abbey doorway svn-id: r53402 --- engines/lure/hotspots.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'engines') 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) -- cgit v1.2.3