Fix units stuck on transit-only when resupplying

This commit is contained in:
Adam Mitchell
2020-04-11 17:59:30 +01:00
committed by reaperrr
parent 942dd0e5f7
commit 0a9eb1ff83
5 changed files with 23 additions and 5 deletions

View File

@@ -171,6 +171,12 @@ namespace OpenRA.Mods.Common.Activities
public override void Cancel(Actor self, bool keepQueue = false)
{
// HACK: force move activities to ignore the transit-only cells when cancelling
// The idle handler will take over and move them into a safe cell
if (ChildActivity != null)
foreach (var c in ChildActivity.ActivitiesImplementing<Move>())
c.Cancel(self, false, true);
foreach (var t in transportCallers)
t.MovementCancelled(self);