fix some support powers
This commit is contained in:
@@ -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) { }
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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 ) {}
|
||||
|
||||
@@ -71,9 +71,6 @@ namespace OpenRA.Mods.RA
|
||||
a.QueueActivity(new RemoveSelf());
|
||||
});
|
||||
|
||||
if (Owner == Owner.World.LocalPlayer)
|
||||
self.World.CancelInputMode();
|
||||
|
||||
FinishActivate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -49,7 +49,6 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
silo.Trait<NukeSilo>().Attack(order.TargetLocation);
|
||||
|
||||
self.World.CancelInputMode();
|
||||
FinishActivate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user