standardize soundasset preloading for datablocks

This commit is contained in:
AzaezelX 2023-02-19 05:19:51 -06:00
parent 6c8dfdbe4c
commit 15f7f04bee
13 changed files with 46 additions and 58 deletions

View file

@ -877,15 +877,10 @@ bool ExplosionData::preload(bool server, String &errorStr)
if( !server )
{
if (getSound() != StringTable->EmptyString())
if (getSound() != StringTable->EmptyString() && !isSoundValid())
{
_setSound(getSound());
if (!getSoundProfile())
{
Con::errorf(ConsoleLogEntry::General, "SplashData::preload: Cant get an sfxProfile for splash.");
return false;
}
Con::errorf(ConsoleLogEntry::General, "ExplosionData::preload: Invalid Sound asset.");
return false;
}
if (!particleEmitter && particleEmitterId != 0)