Fix attack move lines not showing up for undeploy on force move units

DeployForGrantedCondition is wrapped around the Move activity, so the AttackMoveActivity thinks that DeployForGrantedCondition is the Move activity.

All it means is that we need to forward the target line request to the Move activity
This commit is contained in:
Gustas
2022-12-06 18:39:21 +02:00
committed by abcdefg30
parent 767ac1c4e2
commit 6fccd6be84

View File

@@ -9,6 +9,7 @@
*/ */
#endregion #endregion
using System.Collections.Generic;
using OpenRA.Activities; using OpenRA.Activities;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Traits; using OpenRA.Traits;
@@ -43,6 +44,15 @@ namespace OpenRA.Mods.Common.Activities
QueueChild(new DeployInner(deploy)); QueueChild(new DeployInner(deploy));
return true; return true;
} }
public override IEnumerable<TargetLineNode> TargetLineNodes(Actor self)
{
if (NextActivity != null)
foreach (var n in NextActivity.TargetLineNodes(self))
yield return n;
yield break;
}
} }
public class DeployInner : Activity public class DeployInner : Activity