SetTargetSilently for DrawLineToTarget

This commit is contained in:
alzeih
2010-07-26 13:57:53 +12:00
parent 526bb3e042
commit 925ca2bb73
10 changed files with 89 additions and 7 deletions

View File

@@ -286,6 +286,13 @@ namespace OpenRA.Traits
if (moveTo.HasValue)
{
self.CancelActivity();
if (self.Owner == self.World.LocalPlayer)
self.World.AddFrameEndTask(w =>
{
var line = self.traits.GetOrDefault<DrawLineToTarget>();
if (line != null)
line.SetTargetSilently(self, Target.FromCell(moveTo.Value), Color.Green);
});
self.QueueActivity(new Move(moveTo.Value, 0));
}
}