mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-02-22 11:51:10 +00:00
Hopefully some medicine for the characters' sore throats from all that taunting
Also my editor ate some trailing whitespace.
This commit is contained in:
parent
d25f0b0d7e
commit
da0c52330e
1 changed files with 34 additions and 27 deletions
47
src/k_kart.c
47
src/k_kart.c
|
@ -1241,6 +1241,26 @@ void K_KartMoveAnimation(player_t *player)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void K_TauntVoiceTimers(player_t *player)
|
||||||
|
{
|
||||||
|
if (!player)
|
||||||
|
return;
|
||||||
|
|
||||||
|
player->kartstuff[k_tauntvoices] = 6*TICRATE;
|
||||||
|
player->kartstuff[k_voices] = 4*TICRATE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void K_RegularVoiceTimers(player_t *player)
|
||||||
|
{
|
||||||
|
if (!player)
|
||||||
|
return;
|
||||||
|
|
||||||
|
player->kartstuff[k_voices] = 3*TICRATE;
|
||||||
|
|
||||||
|
if (player->kartstuff[k_tauntvoices] < 4*TICRATE)
|
||||||
|
player->kartstuff[k_tauntvoices] = 4*TICRATE;
|
||||||
|
}
|
||||||
|
|
||||||
static void K_PlayTauntSound(mobj_t *source)
|
static void K_PlayTauntSound(mobj_t *source)
|
||||||
{
|
{
|
||||||
if (source->player && source->player->kartstuff[k_tauntvoices]) // Prevents taunt sounds from playing every time the button is pressed
|
if (source->player && source->player->kartstuff[k_tauntvoices]) // Prevents taunt sounds from playing every time the button is pressed
|
||||||
|
@ -1248,11 +1268,7 @@ static void K_PlayTauntSound(mobj_t *source)
|
||||||
|
|
||||||
S_StartSound(source, sfx_taunt1+P_RandomKey(4));
|
S_StartSound(source, sfx_taunt1+P_RandomKey(4));
|
||||||
|
|
||||||
if (source->player)
|
K_TauntVoiceTimers(source->player);
|
||||||
{
|
|
||||||
source->player->kartstuff[k_tauntvoices] = 6*TICRATE;
|
|
||||||
source->player->kartstuff[k_voices] = 3*TICRATE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void K_PlayOvertakeSound(mobj_t *source)
|
static void K_PlayOvertakeSound(mobj_t *source)
|
||||||
|
@ -1269,26 +1285,14 @@ static void K_PlayOvertakeSound(mobj_t *source)
|
||||||
|
|
||||||
S_StartSound(source, sfx_slow);
|
S_StartSound(source, sfx_slow);
|
||||||
|
|
||||||
if (source->player)
|
K_RegularVoiceTimers(source->player);
|
||||||
{
|
|
||||||
source->player->kartstuff[k_voices] = 3*TICRATE;
|
|
||||||
|
|
||||||
if (source->player->kartstuff[k_tauntvoices] < 3*TICRATE)
|
|
||||||
source->player->kartstuff[k_tauntvoices] = 3*TICRATE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void K_PlayHitEmSound(mobj_t *source)
|
static void K_PlayHitEmSound(mobj_t *source)
|
||||||
{
|
{
|
||||||
S_StartSound(source, sfx_hitem);
|
S_StartSound(source, sfx_hitem);
|
||||||
|
|
||||||
if (source->player)
|
K_RegularVoiceTimers(source->player);
|
||||||
{
|
|
||||||
source->player->kartstuff[k_voices] = 3*TICRATE;
|
|
||||||
|
|
||||||
if (source->player->kartstuff[k_tauntvoices] < 3*TICRATE)
|
|
||||||
source->player->kartstuff[k_tauntvoices] = 3*TICRATE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void K_MomentumToFacing(player_t *player)
|
void K_MomentumToFacing(player_t *player)
|
||||||
|
@ -3263,8 +3267,11 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
|
|
||||||
if (!player->exiting)
|
if (!player->exiting)
|
||||||
{
|
{
|
||||||
if (player->kartstuff[k_oldposition] <= player->kartstuff[k_position]) // But first, if you lost a place,
|
if (player->kartstuff[k_oldposition] < player->kartstuff[k_position]) // But first, if you lost a place,
|
||||||
|
{
|
||||||
player->kartstuff[k_oldposition] = player->kartstuff[k_position]; // then the other player taunts.
|
player->kartstuff[k_oldposition] = player->kartstuff[k_position]; // then the other player taunts.
|
||||||
|
K_RegularVoiceTimers(player); // and you can't for a bit
|
||||||
|
}
|
||||||
else if (player->kartstuff[k_oldposition] > player->kartstuff[k_position]) // Otherwise,
|
else if (player->kartstuff[k_oldposition] > player->kartstuff[k_position]) // Otherwise,
|
||||||
{
|
{
|
||||||
K_PlayOvertakeSound(player->mo); // Say "YOU'RE TOO SLOW!"
|
K_PlayOvertakeSound(player->mo); // Say "YOU'RE TOO SLOW!"
|
||||||
|
|
Loading…
Reference in a new issue