From c94cf6106947734182c60de0a614e44a625195c4 Mon Sep 17 00:00:00 2001 From: teinarss Date: Tue, 29 Oct 2019 17:34:43 +0100 Subject: [PATCH] Fix OccupiedCells for units sharing cells --- OpenRA.Mods.Common/Traits/Mobile.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OpenRA.Mods.Common/Traits/Mobile.cs b/OpenRA.Mods.Common/Traits/Mobile.cs index 2697deeaef..b325e1d2d3 100644 --- a/OpenRA.Mods.Common/Traits/Mobile.cs +++ b/OpenRA.Mods.Common/Traits/Mobile.cs @@ -229,6 +229,10 @@ namespace OpenRA.Mods.Common.Traits if (FromCell == ToCell) return new[] { Pair.New(FromCell, FromSubCell) }; + // HACK: Should be fixed properly, see https://github.com/OpenRA/OpenRA/pull/17292 for an explanation + if (Info.LocomotorInfo.SharesCell) + return new[] { Pair.New(ToCell, ToSubCell) }; + return new[] { Pair.New(FromCell, FromSubCell), Pair.New(ToCell, ToSubCell) }; } #endregion