From 7b90d321a7a8187b5f2b65e41206c4d73b6818e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Fri, 16 May 2014 16:46:20 +0200 Subject: [PATCH] don't show order lines when selecting idle (attackmoving) actors closes #5039 --- OpenRA.Game/Traits/DrawLineToTarget.cs | 3 +++ OpenRA.Mods.RA/AttackMove.cs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenRA.Game/Traits/DrawLineToTarget.cs b/OpenRA.Game/Traits/DrawLineToTarget.cs index 3448cc9165..415ccc0dd1 100644 --- a/OpenRA.Game/Traits/DrawLineToTarget.cs +++ b/OpenRA.Game/Traits/DrawLineToTarget.cs @@ -51,6 +51,9 @@ namespace OpenRA.Traits public void Selected(Actor a) { + if (a.IsIdle) + return; + // Reset the order line timeout. lifetime = Info.Ticks; } diff --git a/OpenRA.Mods.RA/AttackMove.cs b/OpenRA.Mods.RA/AttackMove.cs index 410a2b0ecf..631c5ffa0d 100644 --- a/OpenRA.Mods.RA/AttackMove.cs +++ b/OpenRA.Mods.RA/AttackMove.cs @@ -44,7 +44,6 @@ namespace OpenRA.Mods.RA { self.CancelActivity(); self.QueueActivity(new AttackMoveActivity(self, move.MoveTo(TargetLocation.Value, 1))); - self.SetTargetLine(Target.FromCell(TargetLocation.Value), Color.Red); } public void TickIdle(Actor self) @@ -60,6 +59,7 @@ namespace OpenRA.Mods.RA if (order.OrderString == "AttackMove") { TargetLocation = move.NearestMoveableCell(order.TargetLocation); + self.SetTargetLine(Target.FromCell(TargetLocation.Value), Color.Red); Activate(self); } }