collapse useless layer of crap in DrawLineToTarget
This commit is contained in:
@@ -33,19 +33,14 @@ 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;
|
this.target = target;
|
||||||
|
if (display)
|
||||||
lifetime = Info.Ticks;
|
lifetime = Info.Ticks;
|
||||||
this.c = c;
|
this.c = c;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetTargetSilently(Actor self, Target target, Color c)
|
|
||||||
{
|
|
||||||
this.target = target;
|
|
||||||
this.c = c;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RenderAfterWorld(WorldRenderer wr, Actor self)
|
public void RenderAfterWorld(WorldRenderer wr, Actor self)
|
||||||
{
|
{
|
||||||
if (self.IsIdle) return;
|
if (self.IsIdle) return;
|
||||||
@@ -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);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user