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

@@ -76,16 +76,7 @@ namespace OpenRA.Mods.RA
newUnit.QueueActivity(mobile.MoveTo(target, 1));
}
if (newUnit.Owner == self.World.LocalPlayer)
{
self.World.AddFrameEndTask(w =>
{
var line = newUnit.TraitOrDefault<DrawLineToTarget>();
if (line != null)
line.SetTargetSilently(newUnit, Target.FromCell(target), Color.Green);
});
}
newUnit.SetTargetLine(Target.FromCell(target), Color.Green, false);
foreach (var t in self.TraitsImplementing<INotifyProduction>())
t.UnitProduced(self, newUnit, exit);