all sounds are stopped before Z_FreeTags even with MUSINFO (#1160)

This commit is contained in:
Roman Fomin 2023-07-28 15:06:45 +07:00 committed by GitHub
parent 3229e9e4ff
commit 777df08a8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View File

@ -1552,14 +1552,8 @@ void P_SetupLevel(int episode, int map, int playermask, skill_t skill)
playback_nextlevel = false;
}
// [crispy] don't load map's default music if loaded from a savegame with
// MUSINFO data
if (!musinfo.from_savegame)
{
// Make sure all sounds are stopped before Z_FreeTags.
S_Start();
}
musinfo.from_savegame = false;
Z_FreeTag(PU_LEVEL);
Z_FreeTag(PU_CACHE);

View File

@ -643,6 +643,14 @@ void S_Start(void)
}
}
// [crispy] don't load map's default music if loaded from a savegame with
// MUSINFO data
if (musinfo.from_savegame)
{
musinfo.from_savegame = false;
return;
}
// start new music for the level
mus_paused = 0;