added local unit avoidance for path-to-range
This commit is contained in:
@@ -61,7 +61,7 @@ namespace OpenRa.Game
|
|||||||
var tilesInRange = Game.FindTilesInCircle(target, range)
|
var tilesInRange = Game.FindTilesInCircle(target, range)
|
||||||
.Where( t => Game.IsCellBuildable( t, umt ) );
|
.Where( t => Game.IsCellBuildable( t, umt ) );
|
||||||
|
|
||||||
var path = FindPath( PathSearch.FromPoints( tilesInRange, src, umt, false ));
|
var path = FindPath( PathSearch.FromPoints( tilesInRange, src, umt, false ).WithCustomBlocker(AvoidUnitsNear(src, 4)));
|
||||||
path.Reverse();
|
path.Reverse();
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user