Remove a pile of duplication from target lines.

Remove MoveFlash.
This commit is contained in:
Paul Chote
2010-11-26 14:30:33 +13:00
parent 5f43923b80
commit b423889c06
21 changed files with 62 additions and 251 deletions

View File

@@ -177,18 +177,7 @@ namespace OpenRA.Mods.RA
{
if( !target.IsValid ) return;
self.QueueActivity(queued, GetAttackActivity(self, target, allowMove));
if (self.Owner == self.World.LocalPlayer)
self.World.AddFrameEndTask(w =>
{
if (self.Destroyed) return;
if (target.IsActor)
w.Add(new FlashTarget(target.Actor));
var line = self.TraitOrDefault<DrawLineToTarget>();
if (line != null)
line.SetTarget(self, target, Color.Red);
});
self.SetTargetLine(target, Color.Red);
}
public void ScanAndAttack(Actor self, bool allowMovement, bool holdStill)