diff --git a/Content.Client/EscapeMenu/UI/Tabs/KeyRebindTab.xaml.cs b/Content.Client/EscapeMenu/UI/Tabs/KeyRebindTab.xaml.cs index ed8d0eb895..b87e757a7d 100644 --- a/Content.Client/EscapeMenu/UI/Tabs/KeyRebindTab.xaml.cs +++ b/Content.Client/EscapeMenu/UI/Tabs/KeyRebindTab.xaml.cs @@ -107,7 +107,6 @@ namespace Content.Client.EscapeMenu.UI.Tabs AddHeader("ui-options-header-interaction-basic"); AddButton(EngineKeyFunctions.Use); - AddButton(ContentKeyFunctions.WideAttack); AddButton(ContentKeyFunctions.UseItemInHand); AddButton(ContentKeyFunctions.AltUseItemInHand); AddButton(ContentKeyFunctions.ActivateItemInWorld); diff --git a/Content.Client/Input/ContentContexts.cs b/Content.Client/Input/ContentContexts.cs index 1ee20b43ff..bf68bbc607 100644 --- a/Content.Client/Input/ContentContexts.cs +++ b/Content.Client/Input/ContentContexts.cs @@ -46,7 +46,6 @@ namespace Content.Client.Input human.AddFunction(ContentKeyFunctions.SmartEquipBackpack); human.AddFunction(ContentKeyFunctions.SmartEquipBelt); human.AddFunction(ContentKeyFunctions.MouseMiddle); - human.AddFunction(ContentKeyFunctions.WideAttack); human.AddFunction(ContentKeyFunctions.ArcadeUp); human.AddFunction(ContentKeyFunctions.ArcadeDown); human.AddFunction(ContentKeyFunctions.ArcadeLeft); diff --git a/Content.Server/Interaction/InteractionSystem.cs b/Content.Server/Interaction/InteractionSystem.cs index 47cbab8b18..3757e1bf1f 100644 --- a/Content.Server/Interaction/InteractionSystem.cs +++ b/Content.Server/Interaction/InteractionSystem.cs @@ -39,8 +39,6 @@ namespace Content.Server.Interaction SubscribeNetworkEvent(HandleDragDropRequestEvent); CommandBinds.Builder - .Bind(ContentKeyFunctions.WideAttack, - new PointerInputCmdHandler(HandleWideAttack)) .Bind(ContentKeyFunctions.TryPullObject, new PointerInputCmdHandler(HandleTryPullObject)) .Register(); @@ -128,21 +126,6 @@ namespace Content.Server.Interaction } #endregion - private bool HandleWideAttack(ICommonSession? session, EntityCoordinates coords, EntityUid uid) - { - // client sanitization - if (!ValidateClientInput(session, coords, uid, out var userEntity)) - { - Logger.InfoS("system.interaction", $"WideAttack input validation failed"); - return true; - } - - if (TryComp(userEntity, out CombatModeComponent? combatMode) && combatMode.IsInCombatMode) - DoAttack(userEntity.Value, coords, true); - - return true; - } - /// /// Entity will try and use their active hand at the target location. /// Don't use for players diff --git a/Content.Shared/Input/ContentKeyFunctions.cs b/Content.Shared/Input/ContentKeyFunctions.cs index 6dce5d00ac..b2f22cd015 100644 --- a/Content.Shared/Input/ContentKeyFunctions.cs +++ b/Content.Shared/Input/ContentKeyFunctions.cs @@ -5,7 +5,6 @@ namespace Content.Shared.Input [KeyFunctions] public static class ContentKeyFunctions { - public static readonly BoundKeyFunction WideAttack = "WideAttack"; public static readonly BoundKeyFunction UseItemInHand = "ActivateItemInHand"; public static readonly BoundKeyFunction AltUseItemInHand = "AltActivateItemInHand"; public static readonly BoundKeyFunction ActivateItemInWorld = "ActivateItemInWorld"; diff --git a/Content.Shared/Interaction/SharedInteractionSystem.cs b/Content.Shared/Interaction/SharedInteractionSystem.cs index d9e308f39b..ea8180f72d 100644 --- a/Content.Shared/Interaction/SharedInteractionSystem.cs +++ b/Content.Shared/Interaction/SharedInteractionSystem.cs @@ -192,7 +192,9 @@ namespace Content.Shared.Interaction // TODO COMBAT Consider using alt-interact for advanced combat? maybe alt-interact disarms? if (!altInteract && TryComp(user, out SharedCombatModeComponent? combatMode) && combatMode.IsInCombatMode) { - DoAttack(user, coordinates, false, target); + // Wide attack if there isn't a target or the target is out of range, click attack otherwise. + var shouldWideAttack = target == null || !InRangeUnobstructed(user, target.Value); + DoAttack(user, coordinates, shouldWideAttack, target); return; } diff --git a/Resources/keybinds.yml b/Resources/keybinds.yml index b133b64635..7518c52bcb 100644 --- a/Resources/keybinds.yml +++ b/Resources/keybinds.yml @@ -17,9 +17,6 @@ binds: type: State key: MouseLeft canFocus: true -- function: WideAttack - type: State - key: Space - function: ShowDebugMonitors type: Toggle key: F3