From 5a216be73059b1bcfe6413da6901267fdcd903e6 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Fri, 17 Jun 2022 15:52:09 +1000 Subject: [PATCH] Make wide attacks optional for now (#8924) --- Content.Server/Weapon/Melee/Components/MeleeWeaponComponent.cs | 2 +- Content.Server/Weapon/Melee/MeleeWeaponSystem.cs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Content.Server/Weapon/Melee/Components/MeleeWeaponComponent.cs b/Content.Server/Weapon/Melee/Components/MeleeWeaponComponent.cs index c773d2f8e9..d690015857 100644 --- a/Content.Server/Weapon/Melee/Components/MeleeWeaponComponent.cs +++ b/Content.Server/Weapon/Melee/Components/MeleeWeaponComponent.cs @@ -28,7 +28,7 @@ namespace Content.Server.Weapon.Melee.Components [ViewVariables(VVAccess.ReadWrite)] [DataField("arc")] - public string Arc { get; set; } = "default"; + public string? Arc { get; set; } = "default"; [ViewVariables(VVAccess.ReadWrite)] [DataField("arcwidth")] diff --git a/Content.Server/Weapon/Melee/MeleeWeaponSystem.cs b/Content.Server/Weapon/Melee/MeleeWeaponSystem.cs index 7a67b48564..5b47fc89b4 100644 --- a/Content.Server/Weapon/Melee/MeleeWeaponSystem.cs +++ b/Content.Server/Weapon/Melee/MeleeWeaponSystem.cs @@ -124,6 +124,8 @@ namespace Content.Server.Weapon.Melee private void OnWideAttack(EntityUid owner, MeleeWeaponComponent comp, WideAttackEvent args) { + if (string.IsNullOrEmpty(comp.Arc)) return; + args.Handled = true; var curTime = _gameTiming.CurTime;