From 572cdc9dbf76be04a873ca3a87590ae4fddd06d6 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Fri, 18 Jun 2010 22:36:24 +1200 Subject: [PATCH] vacate cells earlier --- OpenRA.Game/Traits/Mobile.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OpenRA.Game/Traits/Mobile.cs b/OpenRA.Game/Traits/Mobile.cs index 505034cfd8..caddde09a3 100644 --- a/OpenRA.Game/Traits/Mobile.cs +++ b/OpenRA.Game/Traits/Mobile.cs @@ -105,8 +105,10 @@ namespace OpenRA.Traits public IEnumerable OccupiedCells() { return (fromCell == toCell) - ? new[] { fromCell } - : new[] { fromCell, toCell }; + ? new[] { fromCell } + : CanEnterCell(toCell) + ? new[] { toCell } + : new[] { fromCell, toCell }; } public UnitMovementType GetMovementType()