diff --git a/OpenRA.Mods.RA/Move/Mobile.cs b/OpenRA.Mods.RA/Move/Mobile.cs index 01476b22c1..f685b96804 100755 --- a/OpenRA.Mods.RA/Move/Mobile.cs +++ b/OpenRA.Mods.RA/Move/Mobile.cs @@ -308,7 +308,7 @@ namespace OpenRA.Mods.RA.Move } } - public SubCell GetDesiredSubcell(int2 a) + public SubCell GetDesiredSubcell(int2 a, Actor ignoreActor) { if (!Info.SharesCell) return SubCell.FullCell; @@ -317,7 +317,7 @@ namespace OpenRA.Mods.RA.Move return new[]{ __fromSubCell, SubCell.TopLeft, SubCell.TopRight, SubCell.Center, SubCell.BottomLeft, SubCell.BottomRight}.First(b => { - var blockingActors = uim.GetUnitsAt(a,b); + var blockingActors = uim.GetUnitsAt(a,b).Where(c => c != ignoreActor); if (blockingActors.Count() > 0) { // Non-sharable unit can enter a cell with shareable units only if it can crush all of them diff --git a/OpenRA.Mods.RA/Move/Move.cs b/OpenRA.Mods.RA/Move/Move.cs index a201daac76..90a8ed7cf3 100755 --- a/OpenRA.Mods.RA/Move/Move.cs +++ b/OpenRA.Mods.RA/Move/Move.cs @@ -229,7 +229,7 @@ namespace OpenRA.Mods.RA.Move hasWaited = false; path.RemoveAt( path.Count - 1 ); - var subCell = mobile.GetDesiredSubcell(nextCell); + var subCell = mobile.GetDesiredSubcell(nextCell, ignoreBuilding); return Pair.New(nextCell, subCell); }