don't show order lines when selecting idle (attackmoving) actors

closes #5039
This commit is contained in:
Matthias Mailänder
2014-05-16 16:46:20 +02:00
parent 28c0310357
commit 7b90d321a7
2 changed files with 4 additions and 1 deletions

View File

@@ -51,6 +51,9 @@ namespace OpenRA.Traits
public void Selected(Actor a) public void Selected(Actor a)
{ {
if (a.IsIdle)
return;
// Reset the order line timeout. // Reset the order line timeout.
lifetime = Info.Ticks; lifetime = Info.Ticks;
} }

View File

@@ -44,7 +44,6 @@ namespace OpenRA.Mods.RA
{ {
self.CancelActivity(); self.CancelActivity();
self.QueueActivity(new AttackMoveActivity(self, move.MoveTo(TargetLocation.Value, 1))); self.QueueActivity(new AttackMoveActivity(self, move.MoveTo(TargetLocation.Value, 1)));
self.SetTargetLine(Target.FromCell(TargetLocation.Value), Color.Red);
} }
public void TickIdle(Actor self) public void TickIdle(Actor self)
@@ -60,6 +59,7 @@ namespace OpenRA.Mods.RA
if (order.OrderString == "AttackMove") if (order.OrderString == "AttackMove")
{ {
TargetLocation = move.NearestMoveableCell(order.TargetLocation); TargetLocation = move.NearestMoveableCell(order.TargetLocation);
self.SetTargetLine(Target.FromCell(TargetLocation.Value), Color.Red);
Activate(self); Activate(self);
} }
} }