CanPlaceBuilding always takes topleft (instead of topleft when !adjust)

This commit is contained in:
Bob
2010-01-18 14:25:59 +13:00
parent 738d293b48
commit 4f60b2866b
4 changed files with 4 additions and 5 deletions

View File

@@ -99,9 +99,8 @@ namespace OpenRa
.FirstOrDefault();
}
public static bool CanPlaceBuilding(this World world, string name, BuildingInfo building, int2 xy, Actor toIgnore, bool adjust)
public static bool CanPlaceBuilding(this World world, string name, BuildingInfo building, int2 topLeft, Actor toIgnore)
{
var topLeft = adjust ? xy - Footprint.AdjustForBuildingSize( building ) : xy;
return !Footprint.Tiles(name, building, topLeft).Any(
t => !world.Map.IsInMap(t.X, t.Y) || world.Map.ContainsResource(t) || !world.IsCellBuildable(t,
building.WaterBound ? UnitMovementType.Float : UnitMovementType.Wheel,