From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Sat, 20 Jan 2024 06:22:19 +0000 (+1100) Subject: Fix drag-drop buckle sound playing twice (#24321) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=bbbacf996b812d5bf2b4bb62671ef536a5e2f1b4;p=space-station-14.git Fix drag-drop buckle sound playing twice (#24321) Buckle refactor somedayTM. --- 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);