Fix repair cursor visual feedback target.
This commit is contained in:
@@ -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; } }
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user