From 52ef50397c4d8650fc1539af297612b1fda4fd5f Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Tue, 2 Sep 2025 01:42:06 -0400 Subject: [PATCH] "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. --- src/k_kart.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/k_kart.c b/src/k_kart.c index a76cc0c9b..e4fb8f19a 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -4692,6 +4692,8 @@ void K_CheckpointCrossAward(player_t *player) else { K_AddMessage("Margin Boost!", true, false); + + // epic lighting g_darkness.start = leveltime; g_darkness.end = INT32_MAX; 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);