Podium Music

Uses the multiple alt music options of the podium map's level header in a specific sequence, so it can slot in to the Stereo Mode music list natively, and so custom Podiums don't have to replace existing tracks to function.
This commit is contained in:
toaster 2023-06-03 14:20:48 +01:00
parent 5a3ed5464e
commit 10c18fe3fa
2 changed files with 23 additions and 1 deletions

View file

@ -316,6 +316,21 @@ void K_ResetCeremony(void)
podiumData.rank = grandprixinfo.rank;
podiumData.grade = K_CalculateGPGrade(&podiumData.rank);
// Set up music for podium.
{
if (podiumData.rank.position == 1)
mapmusrng = 2;
else if (podiumData.rank.position <= 3)
mapmusrng = 1;
else
mapmusrng = 0;
if (mapmusrng >= mapheaderinfo[gamemap-1]->musname_size)
mapmusrng = 0;
mapmusflags |= MUSIC_RELOADRESET;
}
if (!grandprixinfo.cup)
{
return;

View file

@ -8075,7 +8075,14 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
S_FadeMusic(0, FixedMul(
FixedDiv((F_GetWipeLength(wipedefs[wipe_level_toblack])-2)*NEWTICRATERATIO, NEWTICRATE), MUSICRATE));
if (!(reloadinggamestate || gamestate != GS_LEVEL))
if (reloadinggamestate)
;
else if (K_PodiumSequence())
{
// mapmusrng is set by local player position in K_ResetCeremony
S_InitLevelMusic(true);
}
else if (gamestate == GS_LEVEL)
{
if (ranspecialwipe == 2)
{