Fix infantry ignoring the default subcell when produced.

They were being created with the correct subcell, but was rejecting it
as invalid because it was already occupied (by the unit itself).
This commit is contained in:
Paul Chote
2020-12-01 17:28:38 +00:00
committed by abcdefg30
parent da5c94858f
commit 942f1e2d9e

View File

@@ -662,7 +662,7 @@ namespace OpenRA.Mods.Common.Traits
subCell = mobile.ToSubCell;
if (recalculateSubCell)
subCell = mobile.Info.LocomotorInfo.SharesCell ? self.World.ActorMap.FreeSubCell(cell, subCell) : SubCell.FullCell;
subCell = mobile.Info.LocomotorInfo.SharesCell ? self.World.ActorMap.FreeSubCell(cell, subCell, a => a != self) : SubCell.FullCell;
// TODO: solve/reduce cell is full problem
if (subCell == SubCell.Invalid)