mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
fix sDefaultAmbience intialization.
we don't want to spool that up before the SFX subsystem has kicked in
This commit is contained in:
parent
22db2d4291
commit
ff0e418132
2 changed files with 15 additions and 11 deletions
|
|
@ -69,6 +69,8 @@ MODULE_END;
|
|||
|
||||
SFXSystem* SFXSystem::smSingleton = NULL;
|
||||
|
||||
/// Default SFXAmbience used to reset the global soundscape.
|
||||
SFXAmbience *sDefaultAmbience;
|
||||
|
||||
// Excludes Null and Blocked as these are not passed out to the control layer.
|
||||
ImplementEnumType( SFXStatus,
|
||||
|
|
@ -364,7 +366,8 @@ void SFXSystem::init()
|
|||
// register them in the provider initialization.
|
||||
|
||||
// Create the system.
|
||||
smSingleton = new SFXSystem();
|
||||
smSingleton = new SFXSystem();
|
||||
sDefaultAmbience = new SFXAmbience();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -384,6 +387,7 @@ void SFXSystem::destroy()
|
|||
// Destroy the stream thread pool
|
||||
|
||||
SFXInternal::SFXThreadPool::deleteSingleton();
|
||||
delete(sDefaultAmbience);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -1617,10 +1621,10 @@ DefineEngineFunction( sfxPlayOnce, S32, (StringTableEntry assetId, const char* a
|
|||
{
|
||||
SFXDescription* description = NULL;
|
||||
if (assetId == StringTable->EmptyString())
|
||||
{
|
||||
Con::errorf( "sfxPlayOnce - Must Define a sound asset");
|
||||
return 0;
|
||||
}
|
||||
{
|
||||
Con::errorf( "sfxPlayOnce - Must Define a sound asset");
|
||||
return 0;
|
||||
}
|
||||
|
||||
SFXSource* source = NULL;
|
||||
|
||||
|
|
@ -1639,10 +1643,10 @@ DefineEngineFunction( sfxPlayOnce, S32, (StringTableEntry assetId, const char* a
|
|||
MatrixF transform;
|
||||
transform.set(EulerF(0, 0, 0), Point3F(dAtof(arg0), dAtof(arg1), dAtof(arg2)));
|
||||
source = SFX->playOnce(tempSoundAsset->getSfxProfile(), &transform, NULL, dAtof(arg3));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
Con::errorf("sfxPlayOnce - Could not locate assetId '%s'", assetId);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue