From 6b0238a6cc53b9e0e7341cb669fc9bf5d5b3a1b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sat, 2 Nov 2013 18:26:45 +0100 Subject: [PATCH] don't stack flashes and filter non unit actor related orders --- OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs | 8 +++++++- OpenRA.Mods.RA/Player/PlaceBuilding.cs | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs b/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs index 883cccfb89..0b039a487c 100644 --- a/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs +++ b/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs @@ -145,9 +145,15 @@ namespace OpenRA.Widgets foreach (var o in orders) { if (o.TargetActor != null) + { world.Add(new FlashTarget(o.TargetActor)); - else if (o.TargetLocation != CPos.Zero) + break; + } + else if (o.Subject != world.LocalPlayer.PlayerActor && o.TargetLocation != CPos.Zero) + { world.Add(new MoveFlash(worldRenderer.Position(worldRenderer.Viewport.ViewToWorldPx(mi.Location)), world)); + break; + } } } diff --git a/OpenRA.Mods.RA/Player/PlaceBuilding.cs b/OpenRA.Mods.RA/Player/PlaceBuilding.cs index acc8bf2019..88c5b9ce6a 100755 --- a/OpenRA.Mods.RA/Player/PlaceBuilding.cs +++ b/OpenRA.Mods.RA/Player/PlaceBuilding.cs @@ -31,7 +31,7 @@ namespace OpenRA.Mods.RA // Find the queue with the target actor var queue = w.ActorsWithTrait() .Where(p => p.Actor.Owner == self.Owner && - p.Trait.CurrentItem() != null && + p.Trait.CurrentItem() != null && p.Trait.CurrentItem().Item == order.TargetString && p.Trait.CurrentItem().RemainingTime == 0) .Select(p => p.Trait)