Merge pull request #7645 from Phrohdoh/fix-slope-buildings

Mark ramp/slope tiles as unbuildable.
This commit is contained in:
Pavel Penev
2015-03-11 23:50:17 +02:00

View File

@@ -27,6 +27,12 @@ namespace OpenRA.Mods.Common.Traits
if (!bi.AllowInvalidPlacement && world.ActorMap.GetUnitsAt(cell).Any(a => a != toIgnore))
return false;
var tile = world.Map.MapTiles.Value[cell];
var rampType = world.TileSet.GetTileInfo(tile).RampType;
if (rampType > 0)
return false;
return bi.TerrainTypes.Contains(world.Map.GetTerrainInfo(cell).Type);
}