Misc audio and related changes for replays (#12578)
This commit is contained in:
@@ -199,7 +199,7 @@ public sealed class BackgroundAudioSystem : EntitySystem
|
||||
return;
|
||||
_playingCollection = _currentCollection;
|
||||
var file = _robustRandom.Pick(_currentCollection.PickFiles).ToString();
|
||||
_ambientStream = _audio.PlayGlobal(file, Filter.Local(),
|
||||
_ambientStream = _audio.PlayGlobal(file, Filter.Local(), false,
|
||||
_ambientParams.WithVolume(_ambientParams.Volume + _configManager.GetCVar(CCVars.AmbienceVolume)));
|
||||
}
|
||||
|
||||
@@ -304,7 +304,7 @@ public sealed class BackgroundAudioSystem : EntitySystem
|
||||
return;
|
||||
}
|
||||
|
||||
_lobbyStream = _audio.PlayGlobal(file, Filter.Local(),
|
||||
_lobbyStream = _audio.PlayGlobal(file, Filter.Local(), false,
|
||||
_lobbyParams.WithVolume(_lobbyParams.Volume + _configManager.GetCVar(CCVars.LobbyMusicVolume)));
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ public sealed class ClientGlobalSoundSystem : SharedGlobalSoundSystem
|
||||
{
|
||||
if(!_adminAudioEnabled) return;
|
||||
|
||||
var stream = _audio.PlayGlobal(soundEvent.Filename, Filter.Local(), soundEvent.AudioParams);
|
||||
var stream = _audio.PlayGlobal(soundEvent.Filename, Filter.Local(), false, soundEvent.AudioParams);
|
||||
_adminAudio.Add(stream);
|
||||
}
|
||||
|
||||
@@ -74,13 +74,13 @@ public sealed class ClientGlobalSoundSystem : SharedGlobalSoundSystem
|
||||
// Either the cvar is disabled or it's already playing
|
||||
if(!_eventAudioEnabled || _eventAudio.ContainsKey(soundEvent.Type)) return;
|
||||
|
||||
var stream = _audio.PlayGlobal(soundEvent.Filename, Filter.Local(), soundEvent.AudioParams);
|
||||
var stream = _audio.PlayGlobal(soundEvent.Filename, Filter.Local(), false, soundEvent.AudioParams);
|
||||
_eventAudio.Add(soundEvent.Type, stream);
|
||||
}
|
||||
|
||||
private void PlayGameSound(GameGlobalSoundEvent soundEvent)
|
||||
{
|
||||
_audio.PlayGlobal(soundEvent.Filename, Filter.Local(), soundEvent.AudioParams);
|
||||
_audio.PlayGlobal(soundEvent.Filename, Filter.Local(), false, soundEvent.AudioParams);
|
||||
}
|
||||
|
||||
private void StopStationEventMusic(StopStationEventMusic soundEvent)
|
||||
|
||||
Reference in New Issue
Block a user