diff --git a/OpenRA.Game/Network/Order.cs b/OpenRA.Game/Network/Order.cs index cdc5532035..390cfa65c4 100755 --- a/OpenRA.Game/Network/Order.cs +++ b/OpenRA.Game/Network/Order.cs @@ -45,6 +45,7 @@ namespace OpenRA public CPos ExtraLocation; public uint ExtraData; public bool IsImmediate; + public bool SuppressVisualFeedback; public Player Player { get { return Subject.Owner; } } diff --git a/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs b/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs index 6c4c264262..3b1e4e50be 100644 --- a/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs +++ b/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs @@ -152,14 +152,14 @@ namespace OpenRA.Widgets if (o == null) continue; - if (!flashed) + if (!flashed && !o.SuppressVisualFeedback) { if (o.TargetActor != null) { world.AddFrameEndTask(w => w.Add(new FlashTarget(o.TargetActor))); flashed = true; } - else if (o.Subject != world.LocalPlayer.PlayerActor && o.TargetLocation != CPos.Zero) // TODO: this filters building placement, but also suppport powers :( + else if (o.TargetLocation != CPos.Zero) { world.AddFrameEndTask(w => w.Add(new MoveFlash(worldRenderer.Position(worldRenderer.Viewport.ViewToWorldPx(mi.Location)), world))); flashed = true; diff --git a/OpenRA.Mods.RA/AI/BaseBuilder.cs b/OpenRA.Mods.RA/AI/BaseBuilder.cs index be060c8864..4c280a17b3 100644 --- a/OpenRA.Mods.RA/AI/BaseBuilder.cs +++ b/OpenRA.Mods.RA/AI/BaseBuilder.cs @@ -84,7 +84,8 @@ namespace OpenRA.Mods.RA.AI ai.world.IssueOrder(new Order("PlaceBuilding", ai.p.PlayerActor, false) { TargetLocation = location.Value, - TargetString = currentBuilding.Item + TargetString = currentBuilding.Item, + SuppressVisualFeedback = true }); } } diff --git a/OpenRA.Mods.RA/AI/HackyAI.cs b/OpenRA.Mods.RA/AI/HackyAI.cs index abd441667d..3d1bd3cf3c 100644 --- a/OpenRA.Mods.RA/AI/HackyAI.cs +++ b/OpenRA.Mods.RA/AI/HackyAI.cs @@ -688,7 +688,7 @@ namespace OpenRA.Mods.RA.AI p.PlayerName, buildings.Length); foreach (var a in buildings) - world.IssueOrder(new Order("SetRallyPoint", a.Actor, false) { TargetLocation = ChooseRallyLocationNear(a.Actor.Location) }); + world.IssueOrder(new Order("SetRallyPoint", a.Actor, false) { TargetLocation = ChooseRallyLocationNear(a.Actor.Location), SuppressVisualFeedback = true }); } // Won't work for shipyards... @@ -773,7 +773,7 @@ namespace OpenRA.Mods.RA.AI if (attackLocation == null) return; - world.IssueOrder(new Order(sp.Info.OrderName, supportPowerMngr.self, false) { TargetLocation = attackLocation.Value }); + world.IssueOrder(new Order(sp.Info.OrderName, supportPowerMngr.self, false) { TargetLocation = attackLocation.Value, SuppressVisualFeedback = true }); } } } diff --git a/OpenRA.Mods.RA/Orders/BeaconOrderGenerator.cs b/OpenRA.Mods.RA/Orders/BeaconOrderGenerator.cs index ba8ce8a995..b4d1f88fa2 100644 --- a/OpenRA.Mods.RA/Orders/BeaconOrderGenerator.cs +++ b/OpenRA.Mods.RA/Orders/BeaconOrderGenerator.cs @@ -23,7 +23,7 @@ namespace OpenRA.Mods.RA.Orders if (!world.ShroudObscures(xy)) { world.CancelInputMode(); - yield return new Order("PlaceBeacon", world.LocalPlayer.PlayerActor, false) { TargetLocation = xy }; + yield return new Order("PlaceBeacon", world.LocalPlayer.PlayerActor, false) { TargetLocation = xy, SuppressVisualFeedback = true }; } } diff --git a/OpenRA.Mods.RA/Orders/PlaceBuildingOrderGenerator.cs b/OpenRA.Mods.RA/Orders/PlaceBuildingOrderGenerator.cs index 53dd148698..e39f22ed63 100644 --- a/OpenRA.Mods.RA/Orders/PlaceBuildingOrderGenerator.cs +++ b/OpenRA.Mods.RA/Orders/PlaceBuildingOrderGenerator.cs @@ -62,8 +62,12 @@ namespace OpenRA.Mods.RA.Orders } var isLineBuild = world.Map.Rules.Actors[Building].Traits.Contains(); - yield return new Order(isLineBuild ? "LineBuild" : "PlaceBuilding", - Producer.Owner.PlayerActor, false) { TargetLocation = topLeft, TargetString = Building }; + yield return new Order(isLineBuild ? "LineBuild" : "PlaceBuilding", Producer.Owner.PlayerActor, false) + { + TargetLocation = topLeft, + TargetString = Building, + SuppressVisualFeedback = true + }; } } diff --git a/OpenRA.Mods.RA/RallyPoint.cs b/OpenRA.Mods.RA/RallyPoint.cs index 1b65a58114..2fcb3f660d 100755 --- a/OpenRA.Mods.RA/RallyPoint.cs +++ b/OpenRA.Mods.RA/RallyPoint.cs @@ -40,8 +40,8 @@ namespace OpenRA.Mods.RA public Order IssueOrder( Actor self, IOrderTargeter order, Target target, bool queued ) { - if( order.OrderID == "SetRallyPoint" ) - return new Order(order.OrderID, self, false) { TargetLocation = target.CenterPosition.ToCPos() }; + if (order.OrderID == "SetRallyPoint") + return new Order(order.OrderID, self, false) { TargetLocation = target.CenterPosition.ToCPos(), SuppressVisualFeedback = true }; return null; } diff --git a/OpenRA.Mods.RA/SupportPowers/ChronoshiftPower.cs b/OpenRA.Mods.RA/SupportPowers/ChronoshiftPower.cs index f519513884..4f76a76a0b 100644 --- a/OpenRA.Mods.RA/SupportPowers/ChronoshiftPower.cs +++ b/OpenRA.Mods.RA/SupportPowers/ChronoshiftPower.cs @@ -191,7 +191,8 @@ namespace OpenRA.Mods.RA yield return new Order(order, manager.self, false) { TargetLocation = xy, - ExtraLocation = sourceLocation + ExtraLocation = sourceLocation, + SuppressVisualFeedback = true }; } diff --git a/OpenRA.Mods.RA/SupportPowers/IronCurtainPower.cs b/OpenRA.Mods.RA/SupportPowers/IronCurtainPower.cs index 4f7fbe5057..5836b9f10e 100644 --- a/OpenRA.Mods.RA/SupportPowers/IronCurtainPower.cs +++ b/OpenRA.Mods.RA/SupportPowers/IronCurtainPower.cs @@ -88,7 +88,7 @@ namespace OpenRA.Mods.RA { world.CancelInputMode(); if (mi.Button == MouseButton.Left && power.UnitsInRange(xy).Any()) - yield return new Order(order, manager.self, false) { TargetLocation = xy }; + yield return new Order(order, manager.self, false) { TargetLocation = xy, SuppressVisualFeedback = true }; } public void Tick(World world) diff --git a/OpenRA.Mods.RA/SupportPowers/SupportPowerManager.cs b/OpenRA.Mods.RA/SupportPowers/SupportPowerManager.cs index 5bceff7b41..2220f07b5a 100644 --- a/OpenRA.Mods.RA/SupportPowers/SupportPowerManager.cs +++ b/OpenRA.Mods.RA/SupportPowers/SupportPowerManager.cs @@ -246,7 +246,7 @@ namespace OpenRA.Mods.RA { world.CancelInputMode(); if (mi.Button == expectedButton && world.Map.IsInMap(xy)) - yield return new Order(order, manager.self, false) { TargetLocation = xy }; + yield return new Order(order, manager.self, false) { TargetLocation = xy, SuppressVisualFeedback = true }; } public virtual void Tick(World world) diff --git a/OpenRA.Mods.RA/Widgets/Logic/DiplomacyLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/DiplomacyLogic.cs index 9c23a5b7a6..d336ddbc7b 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/DiplomacyLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/DiplomacyLogic.cs @@ -89,7 +89,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic // HACK: Abuse of the type system here with `CPos` world.IssueOrder(new Order("SetStance", world.LocalPlayer.PlayerActor, false) - { TargetLocation = new CPos((int)ss, 0), TargetString = p.InternalName }); + { TargetLocation = new CPos((int)ss, 0), TargetString = p.InternalName, SuppressVisualFeedback = true }); bw.Text = ss.ToString(); } diff --git a/OpenRA.Mods.RA/Widgets/WorldCommandWidget.cs b/OpenRA.Mods.RA/Widgets/WorldCommandWidget.cs index 035092e0b4..014decb26e 100644 --- a/OpenRA.Mods.RA/Widgets/WorldCommandWidget.cs +++ b/OpenRA.Mods.RA/Widgets/WorldCommandWidget.cs @@ -165,7 +165,7 @@ namespace OpenRA.Mods.RA.Widgets at.PredictedStance = nextStance; // FIXME: Abuse of the type system here with `CPos` - return new Order("SetUnitStance", a, false) { TargetLocation = new CPos((int)nextStance, 0) }; + return new Order("SetUnitStance", a, false) { TargetLocation = new CPos((int)nextStance, 0), SuppressVisualFeedback = true }; }); Game.Debug("Unit stance set to: {0}".F(nextStance));