Add support for queuing AttackMove orders.
This commit is contained in:
committed by
Matthias Mailänder
parent
2bfc7cdd46
commit
f4f27f8980
@@ -49,8 +49,10 @@ namespace OpenRA.Orders
|
||||
if (mi.Button == ExpectedButton && world.Map.Contains(cell))
|
||||
{
|
||||
world.CancelInputMode();
|
||||
|
||||
var queued = mi.Modifiers.HasModifier(Modifiers.Shift);
|
||||
foreach (var subject in Subjects)
|
||||
yield return new Order(OrderName, subject, false) { TargetLocation = cell };
|
||||
yield return new Order(OrderName, subject, queued) { TargetLocation = cell };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
void Activate(Actor self)
|
||||
{
|
||||
self.CancelActivity();
|
||||
self.QueueActivity(new AttackMoveActivity(self, move.MoveTo(TargetLocation.Value, 1)));
|
||||
}
|
||||
|
||||
@@ -64,6 +63,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
if (order.OrderString == "AttackMove")
|
||||
{
|
||||
if (!order.Queued)
|
||||
self.CancelActivity();
|
||||
|
||||
TargetLocation = move.NearestMoveableCell(order.TargetLocation);
|
||||
self.SetTargetLine(Target.FromCell(self.World, TargetLocation.Value), Color.Red);
|
||||
Activate(self);
|
||||
|
||||
Reference in New Issue
Block a user