diff --git a/Content.Shared/ActionBlocker/ActionBlockerSystem.cs b/Content.Shared/ActionBlocker/ActionBlockerSystem.cs index a3cd83042e..6dff8161ee 100644 --- a/Content.Shared/ActionBlocker/ActionBlockerSystem.cs +++ b/Content.Shared/ActionBlocker/ActionBlockerSystem.cs @@ -162,14 +162,12 @@ namespace Content.Shared.ActionBlocker if (ev.Cancelled) return false; - if (target != null) - { - var tev = new GettingAttackedAttemptEvent(); - RaiseLocalEvent(target.Value, ref tev); - return !tev.Cancelled; - } + if (target == null) + return true; - return true; + var tev = new GettingAttackedAttemptEvent(); + RaiseLocalEvent(target.Value, ref tev); + return !tev.Cancelled; } public bool CanChangeDirection(EntityUid uid) diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs index 9a9b282287..a86e07c772 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs @@ -232,7 +232,7 @@ public abstract partial class SharedGunSystem : EntitySystem private void AttemptShoot(EntityUid user, EntityUid gunUid, GunComponent gun) { if (gun.FireRate <= 0f || - !_actionBlockerSystem.CanUseHeldEntity(user)) + !_actionBlockerSystem.CanAttack(user)) return; var toCoordinates = gun.ShootCoordinates;