Draw targeting lines for player-issued orders. Can force-display targets with [alt].
This commit is contained in:
@@ -12,6 +12,7 @@ using OpenRA.Effects;
|
||||
using OpenRA.Mods.RA.Activities;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.Traits.Activities;
|
||||
using System.Drawing;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
@@ -67,7 +68,13 @@ namespace OpenRA.Mods.RA
|
||||
if (!CanEnter(self, order.TargetActor)) return;
|
||||
|
||||
if (self.Owner == self.World.LocalPlayer)
|
||||
self.World.AddFrameEndTask(w => w.Add(new FlashTarget(order.TargetActor)));
|
||||
self.World.AddFrameEndTask(w =>
|
||||
{
|
||||
w.Add(new FlashTarget(order.TargetActor));
|
||||
var line = self.traits.GetOrDefault<DrawLineToTarget>();
|
||||
if (line != null)
|
||||
line.SetTarget(self, order.TargetActor, Color.Green);
|
||||
});
|
||||
|
||||
self.CancelActivity();
|
||||
self.QueueActivity(new Move(order.TargetActor.Location, 1));
|
||||
|
||||
Reference in New Issue
Block a user