Procházet zdrojové kódy

clean out of the manual getSFXProfile() methods

AzaezelX před 3 roky
rodič
revize
ef652ad8b9

+ 2 - 2
Engine/source/T3D/fx/explosion.cpp

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

+ 0 - 7
Engine/source/T3D/fx/explosion.h

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

+ 3 - 3
Engine/source/T3D/fx/precipitation.cpp

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

+ 0 - 7
Engine/source/T3D/fx/precipitation.h

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

+ 2 - 2
Engine/source/T3D/fx/splash.cpp

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

+ 0 - 8
Engine/source/T3D/fx/splash.h

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

+ 1 - 1
Engine/source/T3D/projectile.cpp

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

+ 0 - 7
Engine/source/T3D/projectile.h

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