From 4a0736235bac514bbe2dd69ab900609f244144a3 Mon Sep 17 00:00:00 2001 From: Sir Warock <67167466+SirWarock@users.noreply.github.com> Date: Wed, 26 Nov 2025 14:29:54 +0100 Subject: [PATCH] Fix NT-3 (#4764) --- .../Weapons/Ranged/Systems/SharedGunSystem.cs | 3 ++- .../Weapons/Ranged/Systems/SharedGunSystem.Bipod.cs | 11 +++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs index d3d66d2f2a..17adafba6a 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs @@ -404,7 +404,7 @@ public abstract partial class SharedGunSystem : EntitySystem var shooterEv = new ShooterImpulseEvent(); RaiseLocalEvent(user, ref shooterEv); - if (shooterEv.Push) + if (shooterEv.Push && !shooterEv.CannotBePushed) // DeltaV - Bipods stop you from being moved by recoil. CauseImpulse(fromCoordinates, toCoordinates.Value, user, userPhysics); } @@ -662,6 +662,7 @@ public record struct GunShotEvent(EntityUid User, List<(EntityUid? Uid, IShootab public record struct ShooterImpulseEvent() { public bool Push; + public bool CannotBePushed; // DeltaV - Bipods stop you from being moved by recoil. }; public enum EffectLayers : byte diff --git a/Content.Shared/_DV/Weapons/Ranged/Systems/SharedGunSystem.Bipod.cs b/Content.Shared/_DV/Weapons/Ranged/Systems/SharedGunSystem.Bipod.cs index 04cf96a9cb..91824920ab 100644 --- a/Content.Shared/_DV/Weapons/Ranged/Systems/SharedGunSystem.Bipod.cs +++ b/Content.Shared/_DV/Weapons/Ranged/Systems/SharedGunSystem.Bipod.cs @@ -26,8 +26,10 @@ public abstract partial class SharedGunSystem SubscribeLocalEvent(OnGunRefreshModifiers); SubscribeLocalEvent(SetupBipod); - SubscribeLocalEvent(OnShotAttempted); SubscribeLocalEvent(OnMove); + + SubscribeLocalEvent(OnShotAttempted); + SubscribeLocalEvent(OnImpulse); } private void OnMapInit(Entity weapon, ref MapInitEvent args) @@ -188,9 +190,14 @@ public abstract partial class SharedGunSystem private void OnShotAttempted(Entity ent, ref ShotAttemptedEvent args) { // This is true when the bipod is being set up - Preventing the gun from shooting. - if (Timing.CurTime < ent.Comp.BipodSetupTime + ent.Comp.SetupDelay) + if (Timing.CurTime < ent.Comp.BipodSetupTime + ent.Comp.SetupDelay + TimeSpan.FromSeconds(0.1)) args.Cancel(); } + + private void OnImpulse(Entity bipodUser, ref ShooterImpulseEvent args) + { + args.CannotBePushed = true; + } } ///