fix sDefaultAmbience intialization.

we don't want to spool that up before the SFX subsystem has kicked in
This commit is contained in:
AzaezelX 2022-05-16 19:22:25 -05:00
parent 22db2d4291
commit ff0e418132
2 changed files with 15 additions and 11 deletions

View file

@ -73,7 +73,7 @@ extern F32 gDecalBias;
extern GFXTexHandle gLevelAccuMap;
/// Default SFXAmbience used to reset the global soundscape.
static SFXAmbience sDefaultAmbience;
extern SFXAmbience* sDefaultAmbience;
//-----------------------------------------------------------------------------
@ -256,7 +256,7 @@ void LevelInfo::unpackUpdate(NetConnection *conn, BitStream *stream)
if( mSoundAmbience )
mSoundscape->setAmbience( mSoundAmbience );
else
mSoundscape->setAmbience( &sDefaultAmbience );
mSoundscape->setAmbience( sDefaultAmbience );
}
SFX->setDistanceModel( mSoundDistanceModel );
@ -302,7 +302,7 @@ bool LevelInfo::onAdd()
void LevelInfo::onRemove()
{
if( mSoundscape )
mSoundscape->setAmbience( &sDefaultAmbience );
mSoundscape->setAmbience( sDefaultAmbience );
Parent::onRemove();
}