Introduce Order.SuppressVisualFeedback to cleanly disable flashes.

This commit is contained in:
Paul Chote
2014-06-21 22:05:36 +12:00
parent 32e0bf3edf
commit 7d24053f52
12 changed files with 22 additions and 15 deletions

View File

@@ -191,7 +191,8 @@ namespace OpenRA.Mods.RA
yield return new Order(order, manager.self, false)
{
TargetLocation = xy,
ExtraLocation = sourceLocation
ExtraLocation = sourceLocation,
SuppressVisualFeedback = true
};
}

View File

@@ -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)

View File

@@ -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)