clean out of the manual getSFXProfile() methods

This commit is contained in:
AzaezelX 2021-09-26 20:07:49 -05:00
parent 7b137c2ee8
commit ef652ad8b9
8 changed files with 8 additions and 37 deletions

View file

@ -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);

View file

@ -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;

View file

@ -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();
}

View file

@ -71,13 +71,6 @@ class PrecipitationData : public GameBaseData
void onDropChanged() {}
void onSplashChanged() {}
SFXProfile* getSFXProfile() {
if (mSoundAsset.notNull())
return mSoundAsset->getSfxProfile();
return NULL;
}
};
struct Raindrop

View file

@ -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());

View file

@ -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];

View file

@ -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;

View file

@ -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;