mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-12 00:40:44 +00:00
SoundAsset Refactor
This commit is contained in:
parent
9f29bee45f
commit
da40838560
61 changed files with 1333 additions and 1828 deletions
|
|
@ -127,8 +127,6 @@ ConsoleDocClass( PrecipitationData,
|
|||
//----------------------------------------------------------
|
||||
PrecipitationData::PrecipitationData()
|
||||
{
|
||||
INIT_ASSET(Sound);
|
||||
|
||||
mDropShaderName = StringTable->EmptyString();
|
||||
|
||||
mSplashShaderName = StringTable->EmptyString();
|
||||
|
|
@ -175,7 +173,7 @@ bool PrecipitationData::preload( bool server, String &errorStr )
|
|||
return false;
|
||||
if (!server)
|
||||
{
|
||||
if (!isSoundValid())
|
||||
if (!getSoundSFXTrack())
|
||||
{
|
||||
//return false; -TODO: trigger asset download
|
||||
}
|
||||
|
|
@ -188,7 +186,7 @@ void PrecipitationData::packData(BitStream* stream)
|
|||
{
|
||||
Parent::packData(stream);
|
||||
|
||||
PACKDATA_ASSET(Sound);
|
||||
PACKDATA_ASSET_REFACTOR(Sound);
|
||||
|
||||
PACKDATA_ASSET_REFACTOR(Drop);
|
||||
|
||||
|
|
@ -205,7 +203,7 @@ void PrecipitationData::unpackData(BitStream* stream)
|
|||
{
|
||||
Parent::unpackData(stream);
|
||||
|
||||
UNPACKDATA_ASSET(Sound);
|
||||
UNPACKDATA_ASSET_REFACTOR(Sound);
|
||||
|
||||
UNPACKDATA_ASSET_REFACTOR(Drop);
|
||||
|
||||
|
|
@ -587,9 +585,9 @@ bool Precipitation::onNewDataBlock( GameBaseData *dptr, bool reload )
|
|||
{
|
||||
SFX_DELETE( mAmbientSound );
|
||||
|
||||
if ( mDataBlock->getSoundProfile())
|
||||
if ( mDataBlock->getSoundSFXTrack())
|
||||
{
|
||||
mAmbientSound = SFX->createSource(mDataBlock->getSoundProfile(), &getTransform() );
|
||||
mAmbientSound = SFX->createSource(mDataBlock->getSoundSFXTrack(), &getTransform() );
|
||||
if ( mAmbientSound )
|
||||
mAmbientSound->play();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue