Merge branch 'race-start-stuff' into 'master'

Race start stuff

See merge request KartKrew/Kart!996
This commit is contained in:
Oni 2023-03-01 18:28:37 +00:00
commit ec4c74c10e
2 changed files with 19 additions and 16 deletions

View file

@ -11036,18 +11036,6 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
{
player->pflags &= ~PF_AIRFAILSAFE;
}
// Play the starting countdown sounds
if (player == &players[g_localplayers[0]]) // Don't play louder in splitscreen
{
if ((leveltime == starttime-(3*TICRATE)) || (leveltime == starttime-(2*TICRATE)) || (leveltime == starttime-TICRATE))
S_StartSound(NULL, sfx_s3ka7);
if (leveltime == starttime-(3*TICRATE))
S_FadeOutStopMusic(3500);
else if (leveltime == starttime)
S_StartSound(NULL, sfx_s3kad);
}
}
void K_CheckSpectateStatus(void)

View file

@ -647,24 +647,39 @@ void P_Ticker(boolean run)
if (playeringame[i] && players[i].mo && !P_MobjWasRemoved(players[i].mo))
P_PlayerAfterThink(&players[i]);
// Bosses have a punchy start, so no position.
if (K_CheckBossIntro() == true)
{
// Bosses have a punchy start, so no position.
if (leveltime == 3)
{
S_ChangeMusic(mapmusname, mapmusflags, true);
S_ShowMusicCredit();
}
}
// Plays the music after the starting countdown.
else
else if (leveltime < starttime + TICRATE)
{
if (leveltime == (starttime + (TICRATE/2)))
// Start countdown/music handling
if (leveltime == starttime-(3*TICRATE))
{
S_StartSound(NULL, sfx_s3ka7); // 3,
S_FadeMusic(0, 3500); //S_FadeOutStopMusic(3500); -- TODO the S_StopMusic callback can halt successor music instead
}
else if ((leveltime == starttime-(2*TICRATE)) || (leveltime == starttime-TICRATE))
{
S_StartSound(NULL, sfx_s3ka7); // 2, 1,
}
else if (leveltime == starttime)
{
S_StartSound(NULL, sfx_s3kad); // GO!
}
else if (leveltime == (starttime + (TICRATE/2)))
{
// Plays the music after the starting countdown.
S_ChangeMusic(mapmusname, mapmusflags, true);
S_ShowMusicCredit();
}
// POSITION!! music
if (encoremode)
{
// Encore humming starts immediately.