aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage
diff options
context:
space:
mode:
authorPaul Gilbert2011-04-30 16:31:09 +1000
committerPaul Gilbert2011-04-30 16:31:09 +1000
commit5cbf6347d1af9aaf58a0aea1bd656e5813885a3a (patch)
tree55ffe27644a9d62da01990aa280532604d409e57 /engines/tsage
parent410367ced003c53c2df5ebc7b2eee7b63c7f453b (diff)
downloadscummvm-rg350-5cbf6347d1af9aaf58a0aea1bd656e5813885a3a.tar.gz
scummvm-rg350-5cbf6347d1af9aaf58a0aea1bd656e5813885a3a.tar.bz2
scummvm-rg350-5cbf6347d1af9aaf58a0aea1bd656e5813885a3a.zip
TSAGE: Fixed problem in pathfinding when clicked position is outside walkable areas
Diffstat (limited to 'engines/tsage')
-rw-r--r--engines/tsage/core.cpp2
1 files changed, 1 insertions, 1 deletions
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<int> *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;
}