quick hack to fix aircraft fail in prev

This commit is contained in:
Chris Forbes
2010-10-23 18:45:45 +13:00
parent 0d9cf63dd2
commit 0629b1e2d2

View File

@@ -131,9 +131,12 @@ namespace OpenRA.Traits
{
var ios = a.TraitOrDefault<IOccupySpace>();
if (ios != null)
return ios.OccupiedCells();
else
return new[] { (1f / Game.CellSize * a.CenterLocation).ToInt2() };
{
var cells = ios.OccupiedCells();
if (cells.Any()) return cells;
}
return new[] { (1f / Game.CellSize * a.CenterLocation).ToInt2() };
}
}