Units automatically path around known hazards (eg static base defenses). Test using SAM and TRAN.
Todo: Ignore hazards when force-moving; Apply only to known enemy hazards; Implement more hazard classes Also add a few files I forgot from previous patches
This commit is contained in:
@@ -42,7 +42,7 @@ namespace OpenRA
|
||||
for( int x = 0 ; x < map.MapSize.X ; x++ )
|
||||
for( int y = 0 ; y < map.MapSize.Y ; y++ )
|
||||
for (var umt = UnitMovementType.Foot; umt <= UnitMovementType.Fly; umt++ )
|
||||
passableCost[(int)umt][ x, y ] = (umt == UnitMovementType.Fly) ? 0f : ( world.Map.IsInMap( x, y ) )
|
||||
passableCost[(int)umt][ x, y ] = (umt == UnitMovementType.Fly) ? 1f : ( world.Map.IsInMap( x, y ) )
|
||||
? (float)Rules.TerrainTypes[world.TileSet.GetTerrainType(world.Map.MapTiles[x, y])]
|
||||
.GetCost(umt)
|
||||
: float.PositiveInfinity;
|
||||
|
||||
Reference in New Issue
Block a user