Fix music not updating correctly

This commit is contained in:
Sryder 2017-03-11 00:09:10 +00:00
parent 8934cf69c7
commit 6c4e4bc457
2 changed files with 11 additions and 10 deletions

View File

@ -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);
}
//}

View File

@ -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