mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 20:41:46 +00:00
"Margin Boost" every Margin Boost
Plays the Battle Announcer "Margin Boost" every time, dims the music volume, and also tries to stop all margin boost sfx when a round on the final starpost passed.
This commit is contained in:
parent
466e008720
commit
52ef50397c
1 changed files with 15 additions and 1 deletions
16
src/k_kart.c
16
src/k_kart.c
|
|
@ -4692,6 +4692,8 @@ void K_CheckpointCrossAward(player_t *player)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
K_AddMessage("Margin Boost!", true, false);
|
K_AddMessage("Margin Boost!", true, false);
|
||||||
|
|
||||||
|
// epic lighting
|
||||||
g_darkness.start = leveltime;
|
g_darkness.start = leveltime;
|
||||||
g_darkness.end = INT32_MAX;
|
g_darkness.end = INT32_MAX;
|
||||||
for (UINT8 i = 0; i < MAXSPLITSCREENPLAYERS; i++)
|
for (UINT8 i = 0; i < MAXSPLITSCREENPLAYERS; i++)
|
||||||
|
|
@ -4700,7 +4702,19 @@ void K_CheckpointCrossAward(player_t *player)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
S_StartSound(NULL, sfx_gsha6);
|
player_t *foeplayer = K_DuelOpponent(player);
|
||||||
|
|
||||||
|
if (!(player->duelscore - foeplayer->duelscore == DUELWINNINGSCORE)) // Avoid playing any margin boost sfx when someone wins
|
||||||
|
{
|
||||||
|
S_StartSound(NULL, sfx_gsha6); // Gunstar chk-ching noise
|
||||||
|
S_StartSound(NULL, sfx_duelmb); // Duel announcer call
|
||||||
|
|
||||||
|
// fade out the song for a bit
|
||||||
|
g_musicfade.start = leveltime;
|
||||||
|
g_musicfade.end = g_musicfade.start + 53;
|
||||||
|
g_musicfade.fade = 6;
|
||||||
|
g_musicfade.ticked = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
player_t *opp = K_DuelOpponent(player);
|
player_t *opp = K_DuelOpponent(player);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue