mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-04 09:56:30 +00:00
TSAGE: Fixed problem in pathfinding when clicked position is outside walkable areas
This commit is contained in:
parent
410367ced0
commit
5cbf6347d1
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user