From 5cbf6347d1af9aaf58a0aea1bd656e5813885a3a Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 30 Apr 2011 16:31:09 +1000 Subject: TSAGE: Fixed problem in pathfinding when clicked position is outside walkable areas --- engines/tsage/core.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/tsage') diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index 770b091451..997e8e219e 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -3310,7 +3310,7 @@ void WalkRegions::loadRevised() { */ int WalkRegions::indexOf(const Common::Point &pt, const Common::List *indexList) { for (uint idx = 0; idx < _regionList.size(); ++idx) { - if ((!indexList || contains(*indexList, int(idx + 1))) && _regionList[idx].contains(pt)) + if ((!indexList || !contains(*indexList, int(idx + 1))) && _regionList[idx].contains(pt)) return idx + 1; } -- cgit v1.2.3