Fix drag-drop buckle sound playing twice (#24321)
Buckle refactor somedayTM.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user