Make FrozenUnderFog count passable footprint cells

To avoid crashing on actors with only passable footprint cells.
This commit is contained in:
reaperrr
2016-05-14 00:29:16 +02:00
parent f31ea658ef
commit e59c7a8b1f
2 changed files with 8 additions and 3 deletions

View File

@@ -56,7 +56,7 @@ namespace OpenRA.Mods.Common.Traits
// Explore map-placed actors if the "Explore Map" option is enabled
var exploredMap = !init.World.LobbyInfo.GlobalSettings.Shroud;
startsRevealed = exploredMap && init.Contains<SpawnedByMapInit>() && !init.Contains<HiddenUnderFogInit>();
var footprintCells = FootprintUtils.Tiles(init.Self).ToList();
var footprintCells = FootprintUtils.FrozenUnderFogTiles(init.Self).ToList();
footprint = footprintCells.SelectMany(c => map.ProjectedCellsCovering(c.ToMPos(map))).ToArray();
}