diff options
author | Andrew Kurushin | 2005-09-04 17:40:16 +0000 |
---|---|---|
committer | Andrew Kurushin | 2005-09-04 17:40:16 +0000 |
commit | 4e5cc8d080adca4dafdff81706d3b008261cf2cb (patch) | |
tree | 27f22c15ffca5b3446e882cec26e26f2553035fd /saga/actor.cpp | |
parent | 368785074c9eb9e9cb9f658064a2fcf453f875f5 (diff) | |
download | scummvm-rg350-4e5cc8d080adca4dafdff81706d3b008261cf2cb.tar.gz scummvm-rg350-4e5cc8d080adca4dafdff81706d3b008261cf2cb.tar.bz2 scummvm-rg350-4e5cc8d080adca4dafdff81706d3b008261cf2cb.zip |
fix #1269037 Rif walks off-screen when looking at screen at desk
svn-id: r18774
Diffstat (limited to 'saga/actor.cpp')
-rw-r--r-- | saga/actor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/saga/actor.cpp b/saga/actor.cpp index 3dd1d7e5cc..fdd9f82064 100644 --- a/saga/actor.cpp +++ b/saga/actor.cpp @@ -1975,13 +1975,14 @@ bool Actor::actorWalkTo(uint16 actorId, const Location &toLocation) { pointBest = actor->_walkStepsPoints[actor->_walkStepsCount - 1]; + pointBest.x &= ~1; delta.x = ABS(pointFrom.x - pointTo.x); delta.y = ABS(pointFrom.y - pointTo.y); bestDelta.x = ABS(pointBest.x - pointTo.x); bestDelta.y = ABS(pointBest.y - pointTo.y); - if (delta.x + delta.y <= bestDelta.x + bestDelta.y && (actor->_flags & kFollower)) { + if ((delta.x + delta.y <= bestDelta.x + bestDelta.y) && (actor->_flags & kFollower)) { actor->_actorFlags |= kActorNoFollow; } @@ -2542,7 +2543,6 @@ int Actor::fillPathArray(const Point &fromPoint, const Point &toPoint, Point &be bestRating = currentRating; bestPath = nextPoint; } - pathDirection = &_pathDirectionList[i]; } ++i; } while (i < _pathDirectionListCount); |