mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-15 10:06:24 +00:00
Move starting countdown sounds to p_tick.c
Fixes an issue where the starting countdown wouldn't play in spectator mode or hitlag
This commit is contained in:
parent
5ee9b9d5b6
commit
13a987a0a2
2 changed files with 13 additions and 12 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;
|
||||
}
|
||||
|
||||
// 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)
|
||||
|
|
|
|||
13
src/p_tick.c
13
src/p_tick.c
|
|
@ -659,6 +659,19 @@ void P_Ticker(boolean run)
|
|||
// Plays the music after the starting countdown.
|
||||
else
|
||||
{
|
||||
if (leveltime == starttime-(3*TICRATE))
|
||||
{
|
||||
S_StartSound(NULL, sfx_s3ka7); // 3,
|
||||
S_FadeOutStopMusic(3500);
|
||||
}
|
||||
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!
|
||||
}
|
||||
if (leveltime == (starttime + (TICRATE/2)))
|
||||
{
|
||||
S_ChangeMusic(mapmusname, mapmusflags, true);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue