From 33210c4a1e8bf06b9464ba4501d339e33b12862d Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Thu, 14 Oct 2021 15:05:49 -0500 Subject: [PATCH] minor logic cleanups. we want to ensure if we *do* set the projectile sound to empty via editor, that gets propagated --- Engine/source/T3D/projectile.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Engine/source/T3D/projectile.cpp b/Engine/source/T3D/projectile.cpp index 4150f1506..e43372720 100644 --- a/Engine/source/T3D/projectile.cpp +++ b/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 )