mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
clean out of the manual getSFXProfile() methods
This commit is contained in:
parent
7b137c2ee8
commit
ef652ad8b9
8 changed files with 8 additions and 37 deletions
|
|
@ -859,7 +859,7 @@ bool ExplosionData::preload(bool server, String &errorStr)
|
|||
if (Parent::preload(server, errorStr) == false)
|
||||
return false;
|
||||
|
||||
if (!server && !getSFXProfile())
|
||||
if (!server && !getSoundProfile())
|
||||
return false;
|
||||
|
||||
if( !server )
|
||||
|
|
@ -1382,7 +1382,7 @@ bool Explosion::explode()
|
|||
resetWorldBox();
|
||||
}
|
||||
|
||||
SFXProfile* sound_prof = mDataBlock->getSFXProfile();
|
||||
SFXProfile* sound_prof = mDataBlock->getSoundProfile();
|
||||
if (sound_prof)
|
||||
{
|
||||
soundProfile_clone = sound_prof->cloneAndPerformSubstitutions(ss_object, ss_index);
|
||||
|
|
|
|||
|
|
@ -73,13 +73,6 @@ class ExplosionData : public GameBaseData {
|
|||
DECLARE_SOUNDASSET(ExplosionData, Sound);
|
||||
DECLARE_SOUNDASSET_SETGET(ExplosionData, Sound);
|
||||
|
||||
SFXProfile* getSFXProfile() {
|
||||
if (mSoundAsset.notNull())
|
||||
return mSoundAsset->getSfxProfile();
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ParticleEmitterData* particleEmitter;
|
||||
S32 particleEmitterId;
|
||||
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ bool PrecipitationData::preload( bool server, String &errorStr )
|
|||
if( Parent::preload( server, errorStr) == false)
|
||||
return false;
|
||||
|
||||
if (!server && !getSFXProfile())
|
||||
if (!server && !getSoundProfile())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
|
@ -597,9 +597,9 @@ bool Precipitation::onNewDataBlock( GameBaseData *dptr, bool reload )
|
|||
{
|
||||
SFX_DELETE( mAmbientSound );
|
||||
|
||||
if ( mDataBlock->getSFXProfile())
|
||||
if ( mDataBlock->getSoundProfile())
|
||||
{
|
||||
mAmbientSound = SFX->createSource(mDataBlock->getSFXProfile(), &getTransform() );
|
||||
mAmbientSound = SFX->createSource(mDataBlock->getSoundProfile(), &getTransform() );
|
||||
if ( mAmbientSound )
|
||||
mAmbientSound->play();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,13 +71,6 @@ class PrecipitationData : public GameBaseData
|
|||
|
||||
void onDropChanged() {}
|
||||
void onSplashChanged() {}
|
||||
|
||||
SFXProfile* getSFXProfile() {
|
||||
if (mSoundAsset.notNull())
|
||||
return mSoundAsset->getSfxProfile();
|
||||
|
||||
return NULL;
|
||||
}
|
||||
};
|
||||
|
||||
struct Raindrop
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ bool SplashData::preload(bool server, String &errorStr)
|
|||
if (Parent::preload(server, errorStr) == false)
|
||||
return false;
|
||||
|
||||
if (!server && !getSFXProfile())
|
||||
if (!server && !getSoundProfile())
|
||||
return false;
|
||||
|
||||
if (!server)
|
||||
|
|
@ -681,7 +681,7 @@ void Splash::spawnExplosion()
|
|||
|
||||
/// could just play the explosion one, but explosion could be weapon specific,
|
||||
/// splash sound could be liquid specific. food for thought.
|
||||
SFXProfile* sound_prof = mDataBlock->getSFXProfile();
|
||||
SFXProfile* sound_prof = mDataBlock->getSoundProfile();
|
||||
if (sound_prof)
|
||||
{
|
||||
SFX->playOnce(sound_prof, &getTransform());
|
||||
|
|
|
|||
|
|
@ -98,14 +98,6 @@ public:
|
|||
DECLARE_SOUNDASSET(SplashData, Sound);
|
||||
DECLARE_SOUNDASSET_SETGET(SplashData, Sound);
|
||||
|
||||
/// this should probably be added as a function higher up to stop repeats.
|
||||
SFXProfile* getSFXProfile() {
|
||||
if (mSoundAsset.notNull())
|
||||
return mSoundAsset->getSfxProfile();
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ParticleEmitterData* emitterList[NUM_EMITTERS];
|
||||
S32 emitterIDList[NUM_EMITTERS];
|
||||
|
||||
|
|
|
|||
|
|
@ -882,7 +882,7 @@ bool Projectile::onNewDataBlock( GameBaseData *dptr, bool reload )
|
|||
SFX_DELETE( mSound );
|
||||
|
||||
if ( mDataBlock->getProjectileSound() )
|
||||
mSound = SFX->createSource( mDataBlock->getSFXProfile() );
|
||||
mSound = SFX->createSource( mDataBlock->getProjectileSoundProfile() );
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -118,13 +118,6 @@ public:
|
|||
|
||||
DECLARE_SOUNDASSET(ProjectileData, ProjectileSound);
|
||||
DECLARE_SOUNDASSET_SETGET(ProjectileData, ProjectileSound);
|
||||
|
||||
SFXProfile* getSFXProfile() {
|
||||
if (mProjectileSoundAsset.notNull())
|
||||
return mProjectileSoundAsset->getSfxProfile();
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
LightDescription *lightDesc;
|
||||
S32 lightDescId;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue