diff --git a/src/k_kart.c b/src/k_kart.c index b2fe5744..96f46e9e 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -985,6 +985,10 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd) if (S_SoundPlaying(player->mo, sfx_mega)) // But the sound is playing S_StopSoundByID(player->mo, sfx_mega); // Stop it } + + // Plays the music after the starting countdown. + if (P_IsLocalPlayer(player) && leveltime == 158) + S_ChangeMusicInternal(mapmusname, true); } static void K_PlayTauntSound(mobj_t *source) @@ -3336,10 +3340,6 @@ void K_drawKartHUD(void) K_DrawKartPositionNum(stplyr->kartstuff[k_position]); K_drawKartSpeedometer(); - - // Plays the music after the starting countdown. This is here since it checks every frame regularly. - if (leveltime > 157 && leveltime < (TICRATE+1)*7) - S_ChangeMusicInternal(mapmusname, true); } //} diff --git a/src/p_setup.c b/src/p_setup.c index 844d293d..c619bde2 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -2586,13 +2586,14 @@ boolean P_SetupLevel(boolean skipprecip) S_StopSounds(); S_ClearSfx(); - // SRB2kart 010217 - if (leveltime < 157) + + // As oddly named as this is, this handles music only. + // We should be fine starting it here. + S_Start(); + // 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 + if (leveltime < 158) S_StopMusic(); - if (leveltime > 157) - // As oddly named as this is, this handles music only. - // We should be fine starting it here. - S_Start(); // Let's fade to black here // But only if we didn't do the special stage wipe