From 88bfee872fcb0328b1bd70bb1becdbaac4895df6 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Fri, 21 Oct 2011 17:00:22 +1300 Subject: [PATCH] more tidy in DrawLineToTarget --- OpenRA.Game/Traits/DrawLineToTarget.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/OpenRA.Game/Traits/DrawLineToTarget.cs b/OpenRA.Game/Traits/DrawLineToTarget.cs index f28be31679..3095f78821 100644 --- a/OpenRA.Game/Traits/DrawLineToTarget.cs +++ b/OpenRA.Game/Traits/DrawLineToTarget.cs @@ -24,21 +24,19 @@ namespace OpenRA.Traits public class DrawLineToTarget : IPostRenderSelection { DrawLineToTargetInfo Info; - public DrawLineToTarget(DrawLineToTargetInfo info) - { - this.Info = info; - } - Target target; - int lifetime; Color c; + int lifetime; + + public DrawLineToTarget(DrawLineToTargetInfo info) { this.Info = info; } public void SetTarget(Actor self, Target target, Color c, bool display) { this.target = target; + this.c = c; + if (display) lifetime = Info.Ticks; - this.c = c; } public void RenderAfterWorld(WorldRenderer wr, Actor self)