fixes #38: wrong footprint / offset for 1x1 buildings

This commit is contained in:
Chris Forbes
2009-10-23 21:18:07 +13:00
parent f17e0eec75
commit b265eb6d08

View File

@@ -57,6 +57,9 @@ namespace OpenRa.Game.GameRules
public static int2 AdjustForBuildingSize( UnitInfo.BuildingInfo unitInfo )
{
var dim = unitInfo.Dimensions;
if (dim.X == 1 && dim.Y == 1)
return int2.Zero; /* otherwise 1x1 buildings look stupid */
return new int2( dim.X / 2, ( dim.Y + 1 ) / 2 );
}
}