Cleaned up implementation of #712

Also updates other game classes like the shapebase to utilize the sound asset hooks properly.
This commit is contained in:
JeffR 2022-01-03 20:57:10 -06:00
parent 3812ce2e82
commit 15ef8b4fbe
12 changed files with 312 additions and 187 deletions

View file

@ -352,15 +352,19 @@ bool SFXPlayList::preload( bool server, String& errorStr )
{
for( U32 i = 0; i < NUM_SLOTS; ++ i )
{
_setTrack(getTrack(i),i);
StringTableEntry track = getTrack(i);
if (track != StringTable->EmptyString())
{
_setTrack(getTrack(i), i);
if (!getTrackProfile(i))
{
Con::errorf("SFXPlayList::Preload() - unable to find sfxProfile for asset %s", mTrackAssetId[i]);
return false;
}
if( !sfxResolve( &mSlots.mState[ i ], errorStr ) )
if (!sfxResolve(&mSlots.mState[i], errorStr))
return false;
}
}
}