Fix buckling sounds (#16142)

This commit is contained in:
AJCM-git 2023-05-08 02:14:48 -04:00 committed by GitHub
parent c9671fea6f
commit 211ba8c7bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View 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);