hack around ICE in gmcs-2.6.7; feature wasn't used anyway
This commit is contained in:
@@ -44,7 +44,7 @@ namespace OpenRA.Mods.RA.Widgets
|
|||||||
return ProcessInput(e);
|
return ProcessInput(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool ProcessInput(KeyInput e)
|
bool ProcessInput(KeyInput e)
|
||||||
{
|
{
|
||||||
// command: AttackMove
|
// command: AttackMove
|
||||||
if (e.KeyChar == AttackMoveKey && e.Modifiers == Modifiers.None)
|
if (e.KeyChar == AttackMoveKey && e.Modifiers == Modifiers.None)
|
||||||
@@ -52,7 +52,7 @@ namespace OpenRA.Mods.RA.Widgets
|
|||||||
return PerformAttackMove();
|
return PerformAttackMove();
|
||||||
}
|
}
|
||||||
|
|
||||||
// command: GuardStance
|
/* // command: GuardStance
|
||||||
if (e.KeyChar == HoldGroundKey && (e.Modifiers.HasModifier(Modifiers.Alt)))
|
if (e.KeyChar == HoldGroundKey && (e.Modifiers.HasModifier(Modifiers.Alt)))
|
||||||
{
|
{
|
||||||
return EnableStance<UnitStanceHoldGround>();
|
return EnableStance<UnitStanceHoldGround>();
|
||||||
@@ -82,26 +82,26 @@ namespace OpenRA.Mods.RA.Widgets
|
|||||||
if (e.KeyChar == DefensiveKey && (e.Modifiers.HasModifier(Modifiers.Alt)))
|
if (e.KeyChar == DefensiveKey && (e.Modifiers.HasModifier(Modifiers.Alt)))
|
||||||
{
|
{
|
||||||
return EnableStance<UnitStanceDefensive>();
|
return EnableStance<UnitStanceDefensive>();
|
||||||
}
|
} */
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool EnableStance<T>() where T : UnitStance
|
//bool EnableStance<T>() where T : UnitStance
|
||||||
{
|
//{
|
||||||
if (World.Selection.Actors.Count() == 0)
|
// if (World.Selection.Actors.Count() == 0)
|
||||||
return false;
|
// return false;
|
||||||
|
|
||||||
var traits =
|
// var traits =
|
||||||
World.Selection.Actors.Where(a => !a.Destroyed && a.Owner == World.LocalPlayer && a.TraitOrDefault<T>() != null && !UnitStance.IsActive<T>(a)).
|
// World.Selection.Actors.Where(a => !a.Destroyed && a.Owner == World.LocalPlayer && a.TraitOrDefault<T>() != null && !UnitStance.IsActive<T>(a)).
|
||||||
Select(a => new Pair<Actor, T>(a, a.TraitOrDefault<T>()) );
|
// Select(a => new Pair<Actor, T>(a, a.TraitOrDefault<T>()) );
|
||||||
|
|
||||||
World.AddFrameEndTask(w => traits.Do(p => UnitStance.OrderStance(p.First, p.Second)));
|
// World.AddFrameEndTask(w => traits.Do(p => UnitStance.OrderStance(p.First, p.Second)));
|
||||||
|
|
||||||
return traits.Any();
|
// return traits.Any();
|
||||||
}
|
//}
|
||||||
|
|
||||||
private bool PerformAttackMove()
|
bool PerformAttackMove()
|
||||||
{
|
{
|
||||||
if (World.Selection.Actors.Count() > 0)
|
if (World.Selection.Actors.Count() > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user