diff --git a/OpenRA.Mods.Common/Traits/Air/Aircraft.cs b/OpenRA.Mods.Common/Traits/Air/Aircraft.cs index f594390780..e2afc98576 100644 --- a/OpenRA.Mods.Common/Traits/Air/Aircraft.cs +++ b/OpenRA.Mods.Common/Traits/Air/Aircraft.cs @@ -1325,9 +1325,11 @@ namespace OpenRA.Mods.Common.Traits public override IEnumerable TargetLineNodes(Actor self) { - if (ChildActivity != null) - foreach (var n in ChildActivity.TargetLineNodes(self)) - yield return n; + var a = ChildActivity; + for (; a != null; a = a.NextActivity) + if (!a.IsCanceling) + foreach (var n in a.TargetLineNodes(self)) + yield return n; } } diff --git a/OpenRA.Mods.Common/Traits/Mobile.cs b/OpenRA.Mods.Common/Traits/Mobile.cs index 17b51a1fc0..d43ef4a5ff 100644 --- a/OpenRA.Mods.Common/Traits/Mobile.cs +++ b/OpenRA.Mods.Common/Traits/Mobile.cs @@ -1000,6 +1000,23 @@ namespace OpenRA.Mods.Common.Traits foreach (var cell in rallyPoint) QueueChild(new AttackMoveActivity(self, () => mobile.MoveTo(cell, 1, evaluateNearestMovableCell: true, targetLineColor: Color.OrangeRed))); } + + public override IEnumerable GetTargets(Actor self) + { + if (ChildActivity != null) + return ChildActivity.GetTargets(self); + + return Target.None; + } + + public override IEnumerable TargetLineNodes(Actor self) + { + var a = ChildActivity; + for (; a != null; a = a.NextActivity) + if (!a.IsCanceling) + foreach (var n in a.TargetLineNodes(self)) + yield return n; + } } Activity ICreationActivity.GetCreationActivity()