Fix OccupiedCells for units sharing cells

This commit is contained in:
teinarss
2019-10-29 17:34:43 +01:00
committed by Paul Chote
parent 5315f8603f
commit c94cf61069

View File

@@ -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