fix some support powers

This commit is contained in:
Bob
2010-10-02 14:57:17 +12:00
committed by Paul Chote
parent d6110b9ef0
commit 0cd140849b
10 changed files with 8 additions and 27 deletions

View File

@@ -35,8 +35,11 @@ namespace OpenRA.Orders
IEnumerable<Order> OrderInner(World world, int2 xy, MouseInput mi)
{
if (mi.Button == MouseButton.Left && world.Map.IsInMap(xy))
yield return new Order(order, subject, xy);
if( mi.Button == MouseButton.Left && world.Map.IsInMap( xy ) )
{
world.CancelInputMode();
yield return new Order( order, subject, xy );
}
}
public virtual void Tick(World world) { }

View File

@@ -34,9 +34,6 @@ namespace OpenRA.Mods.Cnc
w.Add(new IonCannon(self, w, order.TargetLocation));
});
if (Owner == Owner.World.LocalPlayer)
self.World.CancelInputMode();
FinishActivate();
}
}

View File

@@ -54,9 +54,9 @@ namespace OpenRA.Mods.RA
{
if (order.OrderString == "BeginMinefield")
{
minefieldStart = order.TargetLocation;
if (self.Owner == self.World.LocalPlayer)
self.World.OrderGenerator = new MinefieldOrderGenerator(self);
//minefieldStart = order.TargetLocation;
//if (self.Owner == self.World.LocalPlayer)
// self.World.OrderGenerator = new MinefieldOrderGenerator(self);
}
if (order.OrderString == "PlaceMinefield")

View File

@@ -63,9 +63,6 @@ namespace OpenRA.Mods.RA.Orders
p.CurrentItem().Item == Building &&
p.CurrentItem().RemainingTime == 0)
.FirstOrDefault();
if (queue == null)
world.CancelInputMode();
}
public void RenderAfterWorld( World world ) {}

View File

@@ -71,9 +71,6 @@ namespace OpenRA.Mods.RA
a.QueueActivity(new RemoveSelf());
});
if (Owner == Owner.World.LocalPlayer)
self.World.CancelInputMode();
FinishActivate();
}
}

View File

@@ -37,9 +37,6 @@ namespace OpenRA.Mods.RA
if (order.OrderString == "ChronosphereActivate")
{
if (self.Owner == self.World.LocalPlayer)
self.World.CancelInputMode();
// Ensure the target cell is valid for the unit
var movement = order.TargetActor.TraitOrDefault<IMove>();
if (!movement.CanEnterCell(order.TargetLocation))

View File

@@ -39,9 +39,6 @@ namespace OpenRA.Mods.RA
if (order.OrderString == "IronCurtain")
{
if (self.Owner == self.World.LocalPlayer)
self.World.CancelInputMode();
var curtain = self.World.Queries.WithTrait<IronCurtain>()
.Where(a => a.Actor.Owner != null)
.FirstOrDefault().Actor;

View File

@@ -49,7 +49,6 @@ namespace OpenRA.Mods.RA
silo.Trait<NukeSilo>().Attack(order.TargetLocation);
self.World.CancelInputMode();
FinishActivate();
}
}

View File

@@ -43,9 +43,6 @@ namespace OpenRA.Mods.RA
if (order.OrderString == "ParatroopersActivate")
{
if (self.Owner == self.World.LocalPlayer)
self.World.CancelInputMode();
DoParadrop(Owner, order.TargetLocation,
self.Info.Traits.Get<ParatroopersPowerInfo>().DropItems);

View File

@@ -41,9 +41,6 @@ namespace OpenRA.Mods.RA
{
FinishActivate();
if (order.Player == Owner.World.LocalPlayer)
self.World.CancelInputMode();
var enterCell = self.World.ChooseRandomEdgeCell();
var plane = self.World.CreateActor("u2", new TypeDictionary