Checks for emptyString in preload

Sound asset out for emptyString
This commit is contained in:
marauder2k7 2021-09-28 21:10:48 +01:00
parent 4429de59b0
commit 76addc52eb
6 changed files with 44 additions and 11 deletions

View file

@ -864,7 +864,15 @@ bool ExplosionData::preload(bool server, String &errorStr)
if( !server )
{
String sfxErrorStr;
if (getSound() != StringTable->EmptyString())
{
_setSound(getSound());
if (!getSoundProfile())
Con::errorf(ConsoleLogEntry::General, "SplashData::preload: Cant get an sfxProfile for splash.");
}
if (!particleEmitter && particleEmitterId != 0)
if (Sim::findObject(particleEmitterId, particleEmitter) == false)
Con::errorf(ConsoleLogEntry::General, "Error, unable to load particle emitter for explosion datablock");