From f3db27da10d88c550ba170b987a00979eb8b8ba5 Mon Sep 17 00:00:00 2001 From: deathride58 Date: Thu, 22 Jan 2026 20:30:02 -0500 Subject: [PATCH] Fixes grappling hook audio infinitely looping (#42588) Fixes a regression with grappling hook sounds by reverting a last-minute commit --- Content.Shared/Weapons/Misc/SharedGrapplingGunSystem.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Content.Shared/Weapons/Misc/SharedGrapplingGunSystem.cs b/Content.Shared/Weapons/Misc/SharedGrapplingGunSystem.cs index b0afbfd2ca..a6f63f6a61 100644 --- a/Content.Shared/Weapons/Misc/SharedGrapplingGunSystem.cs +++ b/Content.Shared/Weapons/Misc/SharedGrapplingGunSystem.cs @@ -173,10 +173,11 @@ public abstract class SharedGrapplingGunSystem : VirtualController if (value) { // We null-coalesce here because playing the sound again will cause it to become eternally stuck playing - component.Stream = _audio.PlayPredicted(component.ReelSound, uid, user)?.Entity ?? component.Stream; + component.Stream ??= _audio.PlayPredicted(component.ReelSound, uid, user)?.Entity; } - else if (!value && component.Stream.HasValue) + else if (!value && component.Stream.HasValue && Timing.IsFirstTimePredicted) { + // The IsFirstTimePredicted check is important here because otherwise component.Stream will be set to null from an early cancellation if this isn't FirstTimePredicted component.Stream = _audio.Stop(component.Stream); } -- 2.52.0