mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'race-start-stuff' into 'master'
Race start stuff See merge request KartKrew/Kart!996
This commit is contained in:
commit
ec4c74c10e
2 changed files with 19 additions and 16 deletions
12
src/k_kart.c
12
src/k_kart.c
|
|
@ -11036,18 +11036,6 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
{
|
{
|
||||||
player->pflags &= ~PF_AIRFAILSAFE;
|
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)
|
void K_CheckSpectateStatus(void)
|
||||||
|
|
|
||||||
23
src/p_tick.c
23
src/p_tick.c
|
|
@ -647,24 +647,39 @@ void P_Ticker(boolean run)
|
||||||
if (playeringame[i] && players[i].mo && !P_MobjWasRemoved(players[i].mo))
|
if (playeringame[i] && players[i].mo && !P_MobjWasRemoved(players[i].mo))
|
||||||
P_PlayerAfterThink(&players[i]);
|
P_PlayerAfterThink(&players[i]);
|
||||||
|
|
||||||
// Bosses have a punchy start, so no position.
|
|
||||||
if (K_CheckBossIntro() == true)
|
if (K_CheckBossIntro() == true)
|
||||||
{
|
{
|
||||||
|
// Bosses have a punchy start, so no position.
|
||||||
if (leveltime == 3)
|
if (leveltime == 3)
|
||||||
{
|
{
|
||||||
S_ChangeMusic(mapmusname, mapmusflags, true);
|
S_ChangeMusic(mapmusname, mapmusflags, true);
|
||||||
S_ShowMusicCredit();
|
S_ShowMusicCredit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Plays the music after the starting countdown.
|
else if (leveltime < starttime + TICRATE)
|
||||||
else
|
|
||||||
{
|
{
|
||||||
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_ChangeMusic(mapmusname, mapmusflags, true);
|
||||||
S_ShowMusicCredit();
|
S_ShowMusicCredit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// POSITION!! music
|
||||||
if (encoremode)
|
if (encoremode)
|
||||||
{
|
{
|
||||||
// Encore humming starts immediately.
|
// Encore humming starts immediately.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue