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

@ -153,10 +153,9 @@ bool SFXAmbience::preload( bool server, String& errorStr )
if( !sfxResolve( &mEnvironment, errorStr ) )
return false;
_setSoundTrack(getSoundTrack());
if (!getSoundTrackProfile())
if (getSoundTrack() != StringTable->EmptyString() && !isSoundTrackValid())
{
Con::errorf("SFXAmbience::Preload() - unable to find sfxProfile for asset %s", mSoundTrackAssetId);
Con::errorf(ConsoleLogEntry::General, "SFXAmbience::preload: Invalid SoundTrack asset.");
return false;
}