]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix buckling sounds (#16142)
authorAJCM-git <60196617+AJCM-git@users.noreply.github.com>
Mon, 8 May 2023 06:14:48 +0000 (02:14 -0400)
committerGitHub <noreply@github.com>
Mon, 8 May 2023 06:14:48 +0000 (23:14 -0700)
Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs

index 8a2af7996a68c90b700aeccf98e908c74a696441..405cce0ebe6c835efff0c2db31c0b10655804d0f 100644 (file)
@@ -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);