diff --git a/Robust.Shared/Audio/Systems/SharedAudioSystem.cs b/Robust.Shared/Audio/Systems/SharedAudioSystem.cs index 9fff8c8fb94..e58c0ed36c1 100644 --- a/Robust.Shared/Audio/Systems/SharedAudioSystem.cs +++ b/Robust.Shared/Audio/Systems/SharedAudioSystem.cs @@ -428,7 +428,7 @@ public TimeSpan GetAudioLength(string filename) [return: NotNullIfNotNull("sound")] public (EntityUid Entity, Components.AudioComponent Component)? PlayGlobal(SoundSpecifier? sound, Filter playerFilter, bool recordReplay, AudioParams? audioParams = null) { - return sound == null ? null : PlayGlobal(GetSound(sound), playerFilter, recordReplay, sound.Params); + return sound == null ? null : PlayGlobal(GetSound(sound), playerFilter, recordReplay, audioParams ?? sound.Params); } /// @@ -445,9 +445,9 @@ public TimeSpan GetAudioLength(string filename) /// The sound specifier that points the audio file(s) that should be played. /// The player that will hear the sound. [return: NotNullIfNotNull("sound")] - public (EntityUid Entity, Components.AudioComponent Component)? PlayGlobal(SoundSpecifier? sound, ICommonSession recipient) + public (EntityUid Entity, Components.AudioComponent Component)? PlayGlobal(SoundSpecifier? sound, ICommonSession recipient, AudioParams? audioParams = null) { - return sound == null ? null : PlayGlobal(GetSound(sound), recipient, sound.Params); + return sound == null ? null : PlayGlobal(GetSound(sound), recipient, audioParams ?? sound.Params); } public abstract void LoadStream(Entity entity, T stream); @@ -468,7 +468,7 @@ public TimeSpan GetAudioLength(string filename) [return: NotNullIfNotNull("sound")] public (EntityUid Entity, Components.AudioComponent Component)? PlayGlobal(SoundSpecifier? sound, EntityUid recipient, AudioParams? audioParams = null) { - return sound == null ? null : PlayGlobal(GetSound(sound), recipient, sound.Params); + return sound == null ? null : PlayGlobal(GetSound(sound), recipient, audioParams ?? sound.Params); } ///