]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix the client not passing the weapon to can attack checks (#28040)
authorDrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com>
Wed, 15 May 2024 03:26:02 +0000 (20:26 -0700)
committerGitHub <noreply@github.com>
Wed, 15 May 2024 03:26:02 +0000 (23:26 -0400)
Content.Client/Weapons/Melee/MeleeWeaponSystem.cs

index d59d471f1a3275ffcc08da5b36be9cdf0e95ea02..eba4f21acbc448bd61a0f5b490bb7156cbce6b20 100644 (file)
@@ -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;