collapse useless layer of crap in DrawLineToTarget

This commit is contained in:
Chris Forbes
2011-10-21 16:52:50 +13:00
parent b7b2db9ace
commit 3548dacad3

View File

@@ -33,16 +33,11 @@ namespace OpenRA.Traits
int lifetime; int lifetime;
Color c; Color c;
public void SetTarget(Actor self, Target target, Color c) public void SetTarget(Actor self, Target target, Color c, bool display)
{
this.target = target;
lifetime = Info.Ticks;
this.c = c;
}
public void SetTargetSilently(Actor self, Target target, Color c)
{ {
this.target = target; this.target = target;
if (display)
lifetime = Info.Ticks;
this.c = c; this.c = c;
} }
@@ -96,10 +91,7 @@ namespace OpenRA.Traits
var line = self.TraitOrDefault<DrawLineToTarget>(); var line = self.TraitOrDefault<DrawLineToTarget>();
if (line != null) if (line != null)
if (display) line.SetTarget(self, target, color, display);
line.SetTarget(self, target, color);
else
line.SetTargetSilently(self, target, color);
}); });
} }
} }