- fixed Blood cutscene setup to avoid dependency on the sound code initialization.

It now only stores the sound name or ID but not the internal index which is only looked up when needed.
This commit is contained in:
Christoph Oelckers 2021-05-02 18:10:59 +02:00
parent 575a38d835
commit a1381c0ff2
5 changed files with 21 additions and 20 deletions

View file

@ -121,6 +121,15 @@ CCMD(mapinfo)
}
}
int CutsceneDef::GetSound()
{
int id;
if (soundName.IsNotEmpty()) id = soundEngine->FindSound(soundName);
if (id <= 0) id = soundEngine->FindSoundByResID(soundID);
return id;
}
MapRecord *FindMapByName(const char *nm)
{
for (auto& map : mapList)