mirror of
https://github.com/ENSL/NS.git
synced 2024-11-25 14:01:03 +00:00
add check for cl_musicenabled before initing fmod
This commit is contained in:
parent
a4970388ef
commit
5cf36cb28f
2 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue