Merge pull request #783 from Azaezel/alpha40/ambeintOrderOps

fix sDefaultAmbience intialization.
This commit is contained in:
Brian Roberts 2022-05-25 00:26:27 -05:00 committed by GitHub
commit 13a296aae8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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();
}