]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix drag-drop buckle sound playing twice (#24321)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Sat, 20 Jan 2024 06:22:19 +0000 (17:22 +1100)
committerGitHub <noreply@github.com>
Sat, 20 Jan 2024 06:22:19 +0000 (01:22 -0500)
Buckle refactor somedayTM.

Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs

index 63b7fc17a3ec4e54dcc722bbf77c4179824c4fce..9b2b8ce4c8a984e8322d24a7f49f7c7524cbe3ab 100644 (file)
@@ -362,8 +362,7 @@ public abstract partial class SharedBuckleSystem
         ReAttach(buckleUid, strapUid, buckleComp, strapComp);
         SetBuckledTo(buckleUid, strapUid, strapComp, buckleComp);
         // TODO user is currently set to null because if it isn't the sound fails to play in some situations, fix that
-        var audioSourceUid = userUid == buckleUid ? userUid : strapUid;
-        _audio.PlayPredicted(strapComp.BuckleSound, strapUid, audioSourceUid);
+        _audio.PlayPredicted(strapComp.BuckleSound, strapUid, userUid);
 
         var ev = new BuckleChangeEvent(strapUid, buckleUid, true);
         RaiseLocalEvent(ev.BuckledEntity, ref ev);