Slightly longer delay between voices

Fix win/lose quotes to work based on actual win/lose criteria
Don't play overtake sound until at least 10 seconds into the race
This commit is contained in:
Sryder 2018-06-09 00:04:20 +01:00
parent 97caf79f16
commit 3daf6fbfd7
2 changed files with 15 additions and 11 deletions

View file

@ -1200,8 +1200,8 @@ static void K_PlayTauntSound(mobj_t *source)
if (source->player)
{
source->player->kartstuff[k_tauntvoices] = 175;
source->player->kartstuff[k_voices] = 70;
source->player->kartstuff[k_tauntvoices] = 6*TICRATE;
source->player->kartstuff[k_voices] = 3*TICRATE;
}
}
@ -1210,14 +1210,18 @@ static void K_PlayOvertakeSound(mobj_t *source)
if (source->player && source->player->kartstuff[k_voices]) // Prevents taunt sounds from playing every time the button is pressed
return;
// 4 seconds from before race begins, 10 seconds afterwards
if (leveltime < 14*TICRATE)
return;
S_StartSound(source, sfx_slow);
if (source->player)
{
source->player->kartstuff[k_voices] = 70;
source->player->kartstuff[k_voices] = 3*TICRATE;
if (source->player->kartstuff[k_tauntvoices] < 70)
source->player->kartstuff[k_tauntvoices] = 70;
if (source->player->kartstuff[k_tauntvoices] < 3*TICRATE)
source->player->kartstuff[k_tauntvoices] = 3*TICRATE;
}
}
@ -1230,10 +1234,10 @@ static void K_PlayHitEmSound(mobj_t *source)
if (source->player)
{
source->player->kartstuff[k_voices] = 70;
source->player->kartstuff[k_voices] = 3*TICRATE;
if (source->player->kartstuff[k_tauntvoices] < 70)
source->player->kartstuff[k_tauntvoices] = 70;
if (source->player->kartstuff[k_tauntvoices] < 3*TICRATE)
source->player->kartstuff[k_tauntvoices] = 3*TICRATE;
}
}

View file

@ -1677,10 +1677,10 @@ void P_DoPlayerExit(player_t *player)
if (circuitmap)
{
if (player->kartstuff[k_position] <= 3)
S_StartSound(player->mo, sfx_kwin);
else
if (K_IsPlayerLosing(player))
S_StartSound(player->mo, sfx_klose);
else
S_StartSound(player->mo, sfx_kwin);
}
if (P_IsLocalPlayer(player) && cv_inttime.value > 0)