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:
@@ -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)];
|
||||
|
||||
Reference in New Issue
Block a user