From 0629b1e2d2c995d66806aeab3da396aff0a06f36 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Sat, 23 Oct 2010 18:45:45 +1300 Subject: [PATCH] quick hack to fix aircraft fail in prev --- OpenRA.Game/Traits/World/Shroud.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/OpenRA.Game/Traits/World/Shroud.cs b/OpenRA.Game/Traits/World/Shroud.cs index 8f5ce19415..1b1a348bdb 100644 --- a/OpenRA.Game/Traits/World/Shroud.cs +++ b/OpenRA.Game/Traits/World/Shroud.cs @@ -131,9 +131,12 @@ namespace OpenRA.Traits { var ios = a.TraitOrDefault(); 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() }; } }