A minor tweak

This commit is contained in:
SeventhSentinel 2018-06-28 21:19:58 -04:00
parent 3bfdfe9412
commit 2f82227d6e
2 changed files with 27 additions and 25 deletions

View file

@ -2660,7 +2660,7 @@ boolean P_SetupLevel(boolean skipprecip)
// SRB2 Kart - Yes this is weird, but we don't want the music to start until after the countdown is finished // SRB2 Kart - Yes this is weird, but we don't want the music to start until after the countdown is finished
// but we do still need the mapmusname to be changed // but we do still need the mapmusname to be changed
if (leveltime < (starttime + (TICRATE/2))) if (leveltime < (starttime + (TICRATE/2)))
S_StopMusic(); S_ChangeMusicInternal("kstart", false); //S_StopMusic();
// Let's fade to black here // Let's fade to black here
// But only if we didn't do the special stage wipe // But only if we didn't do the special stage wipe

View file

@ -1165,6 +1165,18 @@ void P_RestoreMusic(player_t *player)
S_SpeedMusic(1.0f); S_SpeedMusic(1.0f);
// SRB2kart - We have some different powers than vanilla, some of which tweak the music. // SRB2kart - We have some different powers than vanilla, some of which tweak the music.
// Event - Race Start
if (leveltime < (starttime + (TICRATE/2)))
S_ChangeMusicInternal("kstart", false); //S_StopMusic();
// Item - Grow
else if (player->kartstuff[k_growshrinktimer] > 1 && player->playerstate == PST_LIVE)
S_ChangeMusicInternal("kgrow", true);
// Item - Invincibility
else if (player->kartstuff[k_invincibilitytimer] > 1 && player->playerstate == PST_LIVE)
S_ChangeMusicInternal("kinvnc", false);
else
{
// Event - Race Finish
if (splitscreen != 0 && G_RaceGametype() if (splitscreen != 0 && G_RaceGametype()
&& (players[consoleplayer].exiting && (players[consoleplayer].exiting
|| players[secondarydisplayplayer].exiting || players[secondarydisplayplayer].exiting
@ -1181,22 +1193,12 @@ void P_RestoreMusic(player_t *player)
S_ChangeMusicInternal("karok", true); S_ChangeMusicInternal("karok", true);
} }
else else
{
// Item - Grow
if (player->kartstuff[k_growshrinktimer] > 1 && player->playerstate == PST_LIVE)
S_ChangeMusicInternal("kgrow", true);
// Item - Invincibility
else if (player->kartstuff[k_invincibilitytimer] > 1 && player->playerstate == PST_LIVE)
S_ChangeMusicInternal("kinvnc", false);
else if (leveltime > (starttime + (TICRATE/2)))
{ {
// Event - Final Lap // Event - Final Lap
if (G_RaceGametype() && player->laps >= (UINT8)(cv_numlaps.value - 1)) if (G_RaceGametype() && player->laps >= (UINT8)(cv_numlaps.value - 1))
S_SpeedMusic(1.2f); S_SpeedMusic(1.2f);
S_ChangeMusic(mapmusname, mapmusflags, true); S_ChangeMusic(mapmusname, mapmusflags, true);
} }
else
S_StopMusic();
} }
} }