separate TargetFlash from DrawLineToTarget

This commit is contained in:
Matthias Mailänder
2013-11-01 11:20:52 +01:00
parent 40d71812f2
commit be1ab707c5
2 changed files with 8 additions and 5 deletions

View File

@@ -141,8 +141,14 @@ namespace OpenRA.Widgets
orders.Do(o => world.IssueOrder(o));
world.PlayVoiceForOrders(orders);
if (orders.Where(o => o.OrderString != null && o.OrderString.EndsWith("Move")).Any())
world.Add(new MoveFlash(worldRenderer.Viewport.ViewToWorldPosition(mi.Location), world));
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));
}
}
public override string GetCursor(int2 screenPos)