Restore MODIFIER_OVERRIDES handling of unmodified attack move hotkey.
This commit is contained in:
@@ -209,9 +209,6 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
var noShiftButtons = new[] { guardButton, deployButton, attackMoveButton };
|
||||
keyOverrides.AddHandler(e =>
|
||||
{
|
||||
if (e.Event != KeyInputEvent.Down)
|
||||
return false;
|
||||
|
||||
// HACK: allow command buttons to be triggered if the shift (queue order modifier) key is held
|
||||
if (e.Modifiers.HasModifier(Modifiers.Shift))
|
||||
{
|
||||
@@ -228,18 +225,15 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
}
|
||||
}
|
||||
|
||||
// HACK: allow attack move to be triggered if the ctrl (assault move modifier)
|
||||
// or shift (queue order modifier) keys are pressed
|
||||
if (e.Modifiers.HasModifier(Modifiers.Ctrl))
|
||||
{
|
||||
var eNoMods = e;
|
||||
eNoMods.Modifiers &= ~(Modifiers.Ctrl | Modifiers.Shift);
|
||||
// HACK: Attack move can be triggered if the ctrl (assault move modifier)
|
||||
// or shift (queue order modifier) keys are pressed, on both key down and key up
|
||||
var eNoMods = e;
|
||||
eNoMods.Modifiers &= ~(Modifiers.Ctrl | Modifiers.Shift);
|
||||
|
||||
if (attackMoveButton != null && !attackMoveDisabled && attackMoveButton.Key.IsActivatedBy(eNoMods))
|
||||
{
|
||||
attackMoveButton.OnKeyPress(e);
|
||||
return true;
|
||||
}
|
||||
if (attackMoveButton != null && !attackMoveDisabled && attackMoveButton.Key.IsActivatedBy(eNoMods))
|
||||
{
|
||||
attackMoveButton.OnKeyPress(e);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user