From b265eb6d084223bc10c0138fd88df2161f96363f Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Fri, 23 Oct 2009 21:18:07 +1300 Subject: [PATCH] fixes #38: wrong footprint / offset for 1x1 buildings --- OpenRa.Game/GameRules/Footprint.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OpenRa.Game/GameRules/Footprint.cs b/OpenRa.Game/GameRules/Footprint.cs index a6efcc35db..cb02f9b823 100644 --- a/OpenRa.Game/GameRules/Footprint.cs +++ b/OpenRa.Game/GameRules/Footprint.cs @@ -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 ); } }