diff options
author | Paul Gilbert | 2011-04-30 16:31:09 +1000 |
---|---|---|
committer | Paul Gilbert | 2011-04-30 16:31:09 +1000 |
commit | 5cbf6347d1af9aaf58a0aea1bd656e5813885a3a (patch) | |
tree | 55ffe27644a9d62da01990aa280532604d409e57 | |
parent | 410367ced003c53c2df5ebc7b2eee7b63c7f453b (diff) | |
download | scummvm-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
-rw-r--r-- | engines/tsage/core.cpp | 2 |
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; } |