separate TargetFlash from DrawLineToTarget
This commit is contained in:
@@ -97,9 +97,6 @@ namespace OpenRA.Traits
|
|||||||
if (self.Destroyed)
|
if (self.Destroyed)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (target.Type == TargetType.Actor && display)
|
|
||||||
w.Add(new FlashTarget(target.Actor));
|
|
||||||
|
|
||||||
var line = self.TraitOrDefault<DrawLineToTarget>();
|
var line = self.TraitOrDefault<DrawLineToTarget>();
|
||||||
if (line != null)
|
if (line != null)
|
||||||
line.SetTarget(self, target, color, display);
|
line.SetTarget(self, target, color, display);
|
||||||
|
|||||||
@@ -141,9 +141,15 @@ namespace OpenRA.Widgets
|
|||||||
orders.Do(o => world.IssueOrder(o));
|
orders.Do(o => world.IssueOrder(o));
|
||||||
|
|
||||||
world.PlayVoiceForOrders(orders);
|
world.PlayVoiceForOrders(orders);
|
||||||
if (orders.Where(o => o.OrderString != null && o.OrderString.EndsWith("Move")).Any())
|
|
||||||
|
foreach (var o in orders)
|
||||||
|
{
|
||||||
|
if (o.TargetActor != null)
|
||||||
|
world.Add(new FlashTarget(o.TargetActor));
|
||||||
|
else if (o.TargetLocation != CPos.Zero)
|
||||||
world.Add(new MoveFlash(worldRenderer.Viewport.ViewToWorldPosition(mi.Location), world));
|
world.Add(new MoveFlash(worldRenderer.Viewport.ViewToWorldPosition(mi.Location), world));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override string GetCursor(int2 screenPos)
|
public override string GetCursor(int2 screenPos)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user