Fix a crash when building placements are moved out of the map.
This commit is contained in:
committed by
abcdefg30
parent
d88198e61e
commit
139af0c2bc
@@ -104,7 +104,7 @@ namespace OpenRA.Mods.D2k.Traits
|
||||
if ((c.Value & filter) == 0)
|
||||
continue;
|
||||
|
||||
var isUnsafe = checkUnsafeTiles && candidateSafeTiles.Contains(c.Key) && info.UnsafeTerrainTypes.Contains(wr.World.Map.GetTerrainInfo(c.Key).Type);
|
||||
var isUnsafe = checkUnsafeTiles && wr.World.Map.Contains(c.Key) && candidateSafeTiles.Contains(c.Key) && info.UnsafeTerrainTypes.Contains(wr.World.Map.GetTerrainInfo(c.Key).Type);
|
||||
var tile = (c.Value & PlaceBuildingCellType.Invalid) != 0 ? blockedTile : isUnsafe ? unsafeTile : validTile;
|
||||
var sequenceAlpha = (c.Value & PlaceBuildingCellType.Invalid) != 0 ? blockedAlpha : isUnsafe ? unsafeAlpha : validAlpha;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user