Fix units not attack moving to waypoints after resupply/takeoff
This commit is contained in:
@@ -212,7 +212,7 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
{
|
{
|
||||||
if (self.CurrentActivity.NextActivity == null && rp != null && rp.Path.Count > 0)
|
if (self.CurrentActivity.NextActivity == null && rp != null && rp.Path.Count > 0)
|
||||||
foreach (var cell in rp.Path)
|
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
|
else
|
||||||
QueueChild(new TakeOff(self));
|
QueueChild(new TakeOff(self));
|
||||||
|
|
||||||
@@ -233,7 +233,7 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
{
|
{
|
||||||
if (rp != null && rp.Path.Count > 0)
|
if (rp != null && rp.Path.Count > 0)
|
||||||
foreach (var cell in rp.Path)
|
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)
|
else if (repairableNear == null)
|
||||||
QueueChild(move.MoveToTarget(self, host));
|
QueueChild(move.MoveToTarget(self, host));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
{
|
{
|
||||||
if (rallyPoint != null && rallyPoint.Path.Count > 0)
|
if (rallyPoint != null && rallyPoint.Path.Count > 0)
|
||||||
foreach (var cell in rallyPoint.Path)
|
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
|
else
|
||||||
reservedFor.QueueActivity(new TakeOff(reservedFor));
|
reservedFor.QueueActivity(new TakeOff(reservedFor));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user