Fix units not attack moving to waypoints after resupply/takeoff

This commit is contained in:
abcdefg30
2020-05-18 13:46:51 +02:00
committed by Paul Chote
parent 0ded0355c1
commit 75fe0e524f
2 changed files with 3 additions and 3 deletions

View File

@@ -212,7 +212,7 @@ namespace OpenRA.Mods.Common.Activities
{
if (self.CurrentActivity.NextActivity == null && rp != null && rp.Path.Count > 0)
foreach (var cell in rp.Path)
QueueChild(move.MoveTo(cell, 1, ignoreActor: repairableNear != null ? null : host.Actor, targetLineColor: Color.Green));
QueueChild(new AttackMoveActivity(self, () => move.MoveTo(cell, 1, ignoreActor: repairableNear != null ? null : host.Actor, targetLineColor: Color.OrangeRed)));
else
QueueChild(new TakeOff(self));
@@ -233,7 +233,7 @@ namespace OpenRA.Mods.Common.Activities
{
if (rp != null && rp.Path.Count > 0)
foreach (var cell in rp.Path)
QueueChild(move.MoveTo(cell, 1, repairableNear != null ? null : host.Actor, true, Color.Green));
QueueChild(new AttackMoveActivity(self, () => move.MoveTo(cell, 1, repairableNear != null ? null : host.Actor, true, Color.OrangeRed)));
else if (repairableNear == null)
QueueChild(move.MoveToTarget(self, host));
}

View File

@@ -86,7 +86,7 @@ namespace OpenRA.Mods.Common.Traits
{
if (rallyPoint != null && rallyPoint.Path.Count > 0)
foreach (var cell in rallyPoint.Path)
reservedFor.QueueActivity(reservedForAircraft.MoveTo(cell, 1, targetLineColor: Color.Green));
reservedFor.QueueActivity(new AttackMoveActivity(reservedFor, () => reservedForAircraft.MoveTo(cell, 1, targetLineColor: Color.OrangeRed)));
else
reservedFor.QueueActivity(new TakeOff(reservedFor));
}