From cc17acbda80460e7c20abd8ca5275777c97acb88 Mon Sep 17 00:00:00 2001 From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Wed, 16 Oct 2024 22:32:32 +0000 Subject: [PATCH] fix grappling hooks getting bricked (#32738) Co-authored-by: deltanedas <@deltanedas:kde.org> --- Content.Shared/Weapons/Misc/SharedGrapplingGunSystem.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Content.Shared/Weapons/Misc/SharedGrapplingGunSystem.cs b/Content.Shared/Weapons/Misc/SharedGrapplingGunSystem.cs index d2f0333b83..e790973538 100644 --- a/Content.Shared/Weapons/Misc/SharedGrapplingGunSystem.cs +++ b/Content.Shared/Weapons/Misc/SharedGrapplingGunSystem.cs @@ -114,19 +114,14 @@ public abstract class SharedGrapplingGunSystem : EntitySystem private void OnGunActivate(EntityUid uid, GrapplingGunComponent component, ActivateInWorldEvent args) { - if (!Timing.IsFirstTimePredicted || args.Handled || !args.Complex) - return; - - if (Deleted(component.Projectile)) + if (!Timing.IsFirstTimePredicted || args.Handled || !args.Complex || component.Projectile is not {} projectile) return; _audio.PlayPredicted(component.CycleSound, uid, args.User); _appearance.SetData(uid, SharedTetherGunSystem.TetherVisualsStatus.Key, true); if (_netManager.IsServer) - { - QueueDel(component.Projectile.Value); - } + QueueDel(projectile); component.Projectile = null; SetReeling(uid, component, false, args.User);