HierarchicalPathFinder.PathExists checks the locations are in map bounds.

Without this, passing locations outside the map could cause a crash instead of reporting no path.
This commit is contained in:
RoosterDragon
2022-08-16 20:04:19 +01:00
committed by Gustas
parent ae3a1c2561
commit 32aaac1dc2

View File

@@ -749,6 +749,9 @@ namespace OpenRA.Mods.Common.Pathfinder
if (costEstimator == null)
return false;
if (!world.Map.Contains(source) || !world.Map.Contains(target))
return false;
RebuildDomains();
var sourceGridInfo = gridInfos[GridIndex(source)];