diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs index 899d6cf249..583376562e 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs @@ -154,19 +154,18 @@ public abstract partial class SharedGunSystem : EntitySystem public GunComponent? GetGun(EntityUid entity) { - if (!EntityManager.TryGetComponent(entity, out SharedHandsComponent? hands) || - hands.ActiveHandEntity is not { } held) - { - return null; - } - - if (!EntityManager.TryGetComponent(held, out GunComponent? gun)) - return null; - if (!_combatMode.IsInCombatMode(entity)) return null; - return gun; + if (EntityManager.TryGetComponent(entity, out SharedHandsComponent? hands) && + hands.ActiveHandEntity is { } held && + TryComp(held, out GunComponent? gun)) + { + return gun; + } + + // Last resort is check if the entity itself is a gun. + return !TryComp(entity, out gun) ? null : gun; } private void StopShooting(GunComponent gun)