diff --git a/OpenRA.Game/Network/Order.cs b/OpenRA.Game/Network/Order.cs index c910db1918..88a8474a0b 100644 --- a/OpenRA.Game/Network/Order.cs +++ b/OpenRA.Game/Network/Order.cs @@ -46,6 +46,7 @@ namespace OpenRA public uint ExtraData; public bool IsImmediate; public bool SuppressVisualFeedback; + public Actor VisualFeedbackTarget; public Player Player { get { return Subject != null ? Subject.Owner : null; } } diff --git a/OpenRA.Mods.Common/Orders/RepairOrderGenerator.cs b/OpenRA.Mods.Common/Orders/RepairOrderGenerator.cs index 94f90e3b46..d9750fd19e 100644 --- a/OpenRA.Mods.Common/Orders/RepairOrderGenerator.cs +++ b/OpenRA.Mods.Common/Orders/RepairOrderGenerator.cs @@ -69,7 +69,7 @@ namespace OpenRA.Mods.Common.Orders if (repairBuilding == null) yield break; - yield return new Order(orderId, underCursor, false) { TargetActor = repairBuilding }; + yield return new Order(orderId, underCursor, false) { TargetActor = repairBuilding, VisualFeedbackTarget = underCursor }; } public void Tick(World world) diff --git a/OpenRA.Mods.Common/Widgets/WorldInteractionControllerWidget.cs b/OpenRA.Mods.Common/Widgets/WorldInteractionControllerWidget.cs index 1bc1f0e2f3..71691fae1b 100644 --- a/OpenRA.Mods.Common/Widgets/WorldInteractionControllerWidget.cs +++ b/OpenRA.Mods.Common/Widgets/WorldInteractionControllerWidget.cs @@ -194,9 +194,10 @@ namespace OpenRA.Mods.Common.Widgets if (!flashed && !o.SuppressVisualFeedback) { - if (o.TargetActor != null) + var visualTargetActor = o.VisualFeedbackTarget ?? o.TargetActor; + if (visualTargetActor != null) { - world.AddFrameEndTask(w => w.Add(new FlashTarget(o.TargetActor))); + world.AddFrameEndTask(w => w.Add(new FlashTarget(visualTargetActor))); flashed = true; } else if (o.TargetLocation != CPos.Zero)