From: AJCM-git <60196617+AJCM-git@users.noreply.github.com> Date: Mon, 8 May 2023 06:14:48 +0000 (-0400) Subject: Fix buckling sounds (#16142) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=211ba8c7bdc558de5ebfd70cc77f8ea762c40184;p=space-station-14.git Fix buckling sounds (#16142) --- diff --git a/Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs b/Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs index 8a2af7996a..405cce0ebe 100644 --- a/Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs +++ b/Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs @@ -354,7 +354,8 @@ public abstract partial class SharedBuckleSystem ReAttach(buckleUid, strapUid, buckleComp, strapComp); SetBuckledTo(buckleUid,strapUid, strapComp, buckleComp); - _audioSystem.PlayPredicted(strapComp.BuckleSound, strapUid, buckleUid); + // TODO user is currently set to null because if it isn't the sound fails to play in some situations, fix that + _audioSystem.PlayPredicted(strapComp.BuckleSound, strapUid, null); var ev = new BuckleChangeEvent(strapUid, buckleUid, true); RaiseLocalEvent(ev.BuckledEntity, ref ev); @@ -480,7 +481,7 @@ public abstract partial class SharedBuckleSystem } AppearanceSystem.SetData(strapUid, StrapVisuals.State, strapComp.BuckledEntities.Count != 0); - _audioSystem.PlayPredicted(strapComp.UnbuckleSound, strapUid, buckleUid); + _audioSystem.PlayPredicted(strapComp.UnbuckleSound, strapUid, null); var ev = new BuckleChangeEvent(strapUid, buckleUid, false); RaiseLocalEvent(buckleUid, ref ev);