add check for cl_musicenabled before initing fmod

This commit is contained in:
pierow 2023-09-07 14:39:33 -04:00
parent a4970388ef
commit 5cf36cb28f
2 changed files with 3 additions and 3 deletions

View file

@ -6524,7 +6524,7 @@ void AvHHud::UpdateAmbientSounds()
for(AmbientSoundListType::iterator theIter = this->mAmbientSounds.begin(); theIter != this->mAmbientSounds.end(); theIter++)
{
if (CVAR_GET_FLOAT("cl_ambientsound") != 0)
if (CVAR_GET_FLOAT("cl_ambientsound") != 0 || CVAR_GET_FLOAT("cl_musicenabled") != 0)
theIter->StartPlayingIfNot();
theIter->UpdateVolume(theListenerPosition);

View file

@ -530,7 +530,7 @@ int UIHud::Redraw(float flTime, int intermission)
}
// Initialize music the first time through
if (CVAR_GET_FLOAT("cl_ambientsound") != 0)
if (CVAR_GET_FLOAT("cl_ambientsound") != 0 || CVAR_GET_FLOAT("cl_musicenabled") != 0)
this->InitializeSound();
}
@ -628,7 +628,7 @@ bool UIHud::Update(float inCurrentTime, string& outError)
this->mManager.Update(inCurrentTime);
bool theSuccess = true;
if (CVAR_GET_FLOAT("cl_ambientsound") != 0) {
if (CVAR_GET_FLOAT("cl_ambientsound") != 0 || CVAR_GET_FLOAT("cl_musicenabled") != 0) {
this->UpdateMusic(inCurrentTime);
//bool theSuccess = this->UpdateInternetStream(inCurrentTime, outError);