From: deathride58 Date: Fri, 23 Jan 2026 01:30:02 +0000 (-0500) Subject: Fixes grappling hook audio infinitely looping (#42588) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=f3db27da10d88c550ba170b987a00979eb8b8ba5;p=space-station-14.git Fixes grappling hook audio infinitely looping (#42588) Fixes a regression with grappling hook sounds by reverting a last-minute commit --- 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); }