From c94751f2d2c0d3951d1252d2c3955b01cedb543e Mon Sep 17 00:00:00 2001 From: DrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com> Date: Tue, 14 May 2024 20:26:02 -0700 Subject: [PATCH] Fix the client not passing the weapon to can attack checks (#28040) --- Content.Client/Weapons/Melee/MeleeWeaponSystem.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Content.Client/Weapons/Melee/MeleeWeaponSystem.cs b/Content.Client/Weapons/Melee/MeleeWeaponSystem.cs index d59d471f1a..eba4f21acb 100644 --- a/Content.Client/Weapons/Melee/MeleeWeaponSystem.cs +++ b/Content.Client/Weapons/Melee/MeleeWeaponSystem.cs @@ -16,8 +16,6 @@ using Robust.Client.State; using Robust.Shared.Input; using Robust.Shared.Map; using Robust.Shared.Player; -using Robust.Shared.Prototypes; -using Robust.Shared.Timing; namespace Content.Client.Weapons.Melee; @@ -66,7 +64,7 @@ public sealed partial class MeleeWeaponSystem : SharedMeleeWeaponSystem if (!TryGetWeapon(entity, out var weaponUid, out var weapon)) return; - if (!CombatMode.IsInCombatMode(entity) || !Blocker.CanAttack(entity)) + if (!CombatMode.IsInCombatMode(entity) || !Blocker.CanAttack(entity, weapon: (weaponUid, weapon))) { weapon.Attacking = false; return;