format and clean up DrawLineToTarget
This commit is contained in:
@@ -20,7 +20,7 @@ namespace OpenRA.Traits
|
|||||||
public virtual object Create(ActorInitializer init) { return new DrawLineToTarget(this); }
|
public virtual object Create(ActorInitializer init) { return new DrawLineToTarget(this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DrawLineToTarget :IPostRenderSelection
|
public class DrawLineToTarget : IPostRenderSelection
|
||||||
{
|
{
|
||||||
DrawLineToTargetInfo Info;
|
DrawLineToTargetInfo Info;
|
||||||
public DrawLineToTarget(DrawLineToTargetInfo info)
|
public DrawLineToTarget(DrawLineToTargetInfo info)
|
||||||
@@ -45,11 +45,9 @@ namespace OpenRA.Traits
|
|||||||
this.c = c;
|
this.c = c;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RenderAfterWorld (Actor self)
|
public void RenderAfterWorld(Actor self)
|
||||||
{
|
{
|
||||||
var activity = self.GetCurrentActivity();
|
if (self.IsIdle) return;
|
||||||
if (activity == null || activity is Idle)
|
|
||||||
return;
|
|
||||||
|
|
||||||
var force = Game.GetModifierKeys().HasModifier(Modifiers.Alt);
|
var force = Game.GetModifierKeys().HasModifier(Modifiers.Alt);
|
||||||
if ((lifetime <= 0 || --lifetime <= 0) && !force)
|
if ((lifetime <= 0 || --lifetime <= 0) && !force)
|
||||||
|
|||||||
Reference in New Issue
Block a user