don't stack flashes and filter non unit actor related orders
This commit is contained in:
@@ -145,9 +145,15 @@ namespace OpenRA.Widgets
|
|||||||
foreach (var o in orders)
|
foreach (var o in orders)
|
||||||
{
|
{
|
||||||
if (o.TargetActor != null)
|
if (o.TargetActor != null)
|
||||||
|
{
|
||||||
world.Add(new FlashTarget(o.TargetActor));
|
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));
|
world.Add(new MoveFlash(worldRenderer.Position(worldRenderer.Viewport.ViewToWorldPx(mi.Location)), world));
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace OpenRA.Mods.RA
|
|||||||
// Find the queue with the target actor
|
// Find the queue with the target actor
|
||||||
var queue = w.ActorsWithTrait<ProductionQueue>()
|
var queue = w.ActorsWithTrait<ProductionQueue>()
|
||||||
.Where(p => p.Actor.Owner == self.Owner &&
|
.Where(p => p.Actor.Owner == self.Owner &&
|
||||||
p.Trait.CurrentItem() != null &&
|
p.Trait.CurrentItem() != null &&
|
||||||
p.Trait.CurrentItem().Item == order.TargetString &&
|
p.Trait.CurrentItem().Item == order.TargetString &&
|
||||||
p.Trait.CurrentItem().RemainingTime == 0)
|
p.Trait.CurrentItem().RemainingTime == 0)
|
||||||
.Select(p => p.Trait)
|
.Select(p => p.Trait)
|
||||||
|
|||||||
Reference in New Issue
Block a user