fixed up some chronoshift consistency crap

This commit is contained in:
Chris Forbes
2010-01-24 12:55:35 +13:00
parent d7a2691db3
commit 311bb670a2
3 changed files with 4 additions and 8 deletions

View File

@@ -17,7 +17,7 @@ namespace OpenRa.Orders
public IEnumerable<Order> Order(World world, int2 xy, MouseInput mi) public IEnumerable<Order> Order(World world, int2 xy, MouseInput mi)
{ {
if (mi.Button == MouseButton.Left) if (mi.Button == MouseButton.Right)
{ {
Game.controller.CancelInputMode(); Game.controller.CancelInputMode();
yield break; yield break;

View File

@@ -20,7 +20,7 @@ namespace OpenRa.Orders
IEnumerable<Order> OrderInner(World world, int2 xy, MouseInput mi) IEnumerable<Order> OrderInner(World world, int2 xy, MouseInput mi)
{ {
if (mi.Button == MouseButton.Left) if (mi.Button == MouseButton.Right)
{ {
var loc = mi.Location + Game.viewport.Location; var loc = mi.Location + Game.viewport.Location;
var underCursor = world.FindUnits(loc, loc) var underCursor = world.FindUnits(loc, loc)
@@ -40,9 +40,8 @@ namespace OpenRa.Orders
var hasChronosphere = world.Actors var hasChronosphere = world.Actors
.Any(a => a.Owner == world.LocalPlayer && a.traits.Contains<Chronosphere>()); .Any(a => a.Owner == world.LocalPlayer && a.traits.Contains<Chronosphere>());
// HACK: re-enable this if (!hasChronosphere)
//if (!hasChronosphere) Game.controller.CancelInputMode();
// Game.controller.CancelInputMode();
} }
public void Render( World world ) { } public void Render( World world ) { }

View File

@@ -28,10 +28,7 @@ namespace OpenRa.Traits
public void ResolveOrder(Actor self, Order order) public void ResolveOrder(Actor self, Order order)
{ {
if (order.OrderString == "ChronosphereSelect" && self.Owner == self.World.LocalPlayer) if (order.OrderString == "ChronosphereSelect" && self.Owner == self.World.LocalPlayer)
{
Game.controller.orderGenerator = new ChronoshiftDestinationOrderGenerator(order.TargetActor); Game.controller.orderGenerator = new ChronoshiftDestinationOrderGenerator(order.TargetActor);
Sound.Play("slcttgt1.aud");
}
if (order.OrderString == "ChronosphereFinish") if (order.OrderString == "ChronosphereFinish")
{ {