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

@@ -56,14 +56,7 @@ namespace OpenRA.Mods.Cnc
if (harvester.LastHarvestedCell != int2.Zero)
{
harv.QueueActivity( mobile.MoveTo(harvester.LastHarvestedCell, 5) );
if (harv.Owner == self.World.LocalPlayer)
self.World.AddFrameEndTask( w =>
{
if (harv.Destroyed) return;
var line = harv.TraitOrDefault<DrawLineToTarget>();
if (line != null)
line.SetTargetSilently(harv, Target.FromCell(harvester.LastHarvestedCell), Color.Green);
});
harv.SetTargetLine(Target.FromCell(harvester.LastHarvestedCell), Color.Red, false);
}
}
harv.QueueActivity( new Harvest() );