From bbbacf996b812d5bf2b4bb62671ef536a5e2f1b4 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Sat, 20 Jan 2024 17:22:19 +1100 Subject: [PATCH] Fix drag-drop buckle sound playing twice (#24321) Buckle refactor somedayTM. --- Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs b/Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs index 63b7fc17a3..9b2b8ce4c8 100644 --- a/Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs +++ b/Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs @@ -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); -- 2.52.0