crushable walls

This commit is contained in:
Chris Forbes
2010-05-06 19:05:31 +12:00
parent 48c5a2ba19
commit 7a25bea751
8 changed files with 72 additions and 17 deletions

View File

@@ -139,9 +139,9 @@ namespace OpenRA
public static bool CanPlaceBuilding(this World world, string name, BuildingInfo building, int2 topLeft, Actor toIgnore)
{
var res = world.WorldActor.traits.Get<ResourceLayer>();
return !Footprint.Tiles(name, building, topLeft).Any(
t => !world.Map.IsInMap(t.X, t.Y) || res.GetResource(t) != null || !world.IsCellBuildable(t,
building.WaterBound, toIgnore));
return Footprint.Tiles(name, building, topLeft).All(
t => world.Map.IsInMap(t.X, t.Y) && res.GetResource(t) == null &&
world.IsCellBuildable(t, building.WaterBound, toIgnore));
}
public static bool IsVisible(this Actor a)