From: nikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com> Date: Sat, 3 Feb 2024 16:43:50 +0000 (+0200) Subject: Fix end of round messages looping forever (#24920) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=09daa534bd32d4784b6dd88ac6877607efec17b8;p=space-station-14.git Fix end of round messages looping forever (#24920) * Fix End of Round messages looping forever and ever and ever * Use the correct setting for round restart sounds --- diff --git a/Content.Client/Audio/BackgroundAudioSystem.cs b/Content.Client/Audio/BackgroundAudioSystem.cs index 9c4bf3f266..2927983062 100644 --- a/Content.Client/Audio/BackgroundAudioSystem.cs +++ b/Content.Client/Audio/BackgroundAudioSystem.cs @@ -25,6 +25,7 @@ public sealed class BackgroundAudioSystem : EntitySystem [Dependency] private readonly IStateManager _stateManager = default!; private readonly AudioParams _lobbyParams = new(-5f, 1, "Master", 0, 0, 0, true, 0f); + private readonly AudioParams _roundEndParams = new(-5f, 1, "Master", 0, 0, 0, false, 0f); public EntityUid? LobbyMusicStream; public EntityUid? LobbyRoundRestartAudioStream; @@ -139,7 +140,7 @@ public sealed class BackgroundAudioSystem : EntitySystem private void PlayRestartSound(RoundRestartCleanupEvent ev) { - if (!_configManager.GetCVar(CCVars.LobbyMusicEnabled)) + if (!_configManager.GetCVar(CCVars.RestartSoundsEnabled)) return; var file = _gameTicker.RestartSound; @@ -152,7 +153,7 @@ public sealed class BackgroundAudioSystem : EntitySystem file, Filter.Local(), false, - _lobbyParams.WithVolume(_lobbyParams.Volume + SharedAudioSystem.GainToVolume(_configManager.GetCVar(CCVars.LobbyMusicVolume))) + _roundEndParams.WithVolume(_roundEndParams.Volume + SharedAudioSystem.GainToVolume(_configManager.GetCVar(CCVars.LobbyMusicVolume))) )?.Entity; } }