Fix buckling sounds (#16142)
This commit is contained in:
@@ -354,7 +354,8 @@ public abstract partial class SharedBuckleSystem
|
|||||||
|
|
||||||
ReAttach(buckleUid, strapUid, buckleComp, strapComp);
|
ReAttach(buckleUid, strapUid, buckleComp, strapComp);
|
||||||
SetBuckledTo(buckleUid,strapUid, strapComp, buckleComp);
|
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);
|
var ev = new BuckleChangeEvent(strapUid, buckleUid, true);
|
||||||
RaiseLocalEvent(ev.BuckledEntity, ref ev);
|
RaiseLocalEvent(ev.BuckledEntity, ref ev);
|
||||||
@@ -480,7 +481,7 @@ public abstract partial class SharedBuckleSystem
|
|||||||
}
|
}
|
||||||
|
|
||||||
AppearanceSystem.SetData(strapUid, StrapVisuals.State, strapComp.BuckledEntities.Count != 0);
|
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);
|
var ev = new BuckleChangeEvent(strapUid, buckleUid, false);
|
||||||
RaiseLocalEvent(buckleUid, ref ev);
|
RaiseLocalEvent(buckleUid, ref ev);
|
||||||
|
|||||||
Reference in New Issue
Block a user