Changed IsCloseEnoughToBase to take top-left position.

This commit is contained in:
Bob
2010-01-18 14:22:38 +13:00
parent 7913fcf75b
commit 738d293b48
4 changed files with 7 additions and 6 deletions

View File

@@ -7,7 +7,7 @@ namespace OpenRa.GameRules
{
static class Footprint
{
public static IEnumerable<int2> Tiles( string name, BuildingInfo buildingInfo, int2 position )
public static IEnumerable<int2> Tiles( string name, BuildingInfo buildingInfo, int2 topLeft )
{
var dim = buildingInfo.Dimensions;
@@ -18,7 +18,7 @@ namespace OpenRa.GameRules
footprint = footprint.Concat(new char[dim.X]);
}
return TilesWhere( name, dim, footprint.ToArray(), a => a != '_' ).Select( t => t + position );
return TilesWhere( name, dim, footprint.ToArray(), a => a != '_' ).Select( t => t + topLeft );
}
public static IEnumerable<int2> Tiles(Actor a, Traits.Building building)