Kaynağa Gözat

minor logic cleanups. we want to ensure if we *do* set the projectile sound to empty via editor, that gets propagated

AzaezelX 3 yıl önce
ebeveyn
işleme
33210c4a1e
1 değiştirilmiş dosya ile 2 ekleme ve 3 silme
  1. 2 3
      Engine/source/T3D/projectile.cpp

+ 2 - 3
Engine/source/T3D/projectile.cpp

@@ -367,10 +367,9 @@ bool ProjectileData::preload(bool server, String &errorStr)
          if (Sim::findObject(decalId, decal) == false)
             Con::errorf(ConsoleLogEntry::General, "ProjectileData::preload: Invalid packet, bad datablockId(decal): %d", decalId);
 
+      _setProjectileSound(getProjectileSound());
       if (getProjectileSound() != StringTable->EmptyString())
       {
-         _setProjectileSound(getProjectileSound());
-
          if (!getProjectileSoundProfile())
             Con::errorf(ConsoleLogEntry::General, "SplashData::preload: Cant get an sfxProfile for splash.");
       }
@@ -1101,7 +1100,7 @@ void Projectile::explode( const Point3F &p, const Point3F &n, const U32 collideT
 
 void Projectile::updateSound()
 {
-   if (!mDataBlock->getProjectileSound())
+   if (!mDataBlock->isProjectileSoundValid())
       return;
 
    if ( mSound )