Merge pull request #10214 from RoosterDragon/lays-terrain-bounds
Ensure LaysTerrain doesn't access cells outside the map
This commit is contained in:
@@ -56,7 +56,7 @@ namespace OpenRA.Mods.D2k.Traits
|
|||||||
foreach (var c in FootprintUtils.Tiles(self))
|
foreach (var c in FootprintUtils.Tiles(self))
|
||||||
{
|
{
|
||||||
// Only place on allowed terrain types
|
// Only place on allowed terrain types
|
||||||
if (!info.TerrainTypes.Contains(map.GetTerrainInfo(c).Type))
|
if (!map.Contains(c) || !info.TerrainTypes.Contains(map.GetTerrainInfo(c).Type))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Don't place under other buildings or custom terrain
|
// Don't place under other buildings or custom terrain
|
||||||
|
|||||||
Reference in New Issue
Block a user