From 99e4975023ec26612eb88f489798a286093594f5 Mon Sep 17 00:00:00 2001 From: AJ Martinez Date: Tue, 5 Mar 2024 15:00:22 -0700 Subject: [PATCH] Sting clarity --- src/k_hud.cpp | 14 +++++++++++++- src/k_kart.c | 5 +++++ src/sounds.c | 3 +++ src/sounds.h | 3 +++ 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/k_hud.cpp b/src/k_hud.cpp index 87d1095ec..e2b1d6794 100644 --- a/src/k_hud.cpp +++ b/src/k_hud.cpp @@ -2957,7 +2957,19 @@ static void K_drawRingCounter(boolean gametypeinfoshown) rn[0] = ((abs(stplyr->hudrings) / 10) % 10); rn[1] = (abs(stplyr->hudrings) % 10); - if (stplyr->hudrings <= 0 && (leveltime/5 & 1)) // In debt + if (stplyr->hudrings <= 0 && stplyr->ringvisualwarning > 1) + { + colorring = true; + if ((leveltime/2 & 1)) + { + ringmap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_CRIMSON, GTC_CACHE); + } + else + { + ringmap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_WHITE, GTC_CACHE); + } + } + else if (stplyr->hudrings <= 0 && (leveltime/5 & 1)) // In debt { ringmap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_CRIMSON, GTC_CACHE); colorring = true; diff --git a/src/k_kart.c b/src/k_kart.c index 8f947d80d..df8fa9aeb 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -4819,6 +4819,11 @@ void K_DebtStingPlayer(player_t *player, mobj_t *source) player->spinouttimer = length; player->wipeoutslow = min(length-1, wipeoutslowtime+1); + player->ringvisualwarning = TICRATE*2; + + if (P_IsDisplayPlayer(player)) + S_StartSoundAtVolume(NULL, sfx_sting0, 170); + P_SetPlayerMobjState(player->mo, S_KART_SPINOUT); } diff --git a/src/sounds.c b/src/sounds.c index 14ccca9cb..527e6b2ad 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -1520,6 +1520,9 @@ sfxinfo_t S_sfx[NUMSFX] = {"tmxbdn", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Button down {"tmxbup", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Button up + // SMS + {"sting0", false, 64, 2, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Ring loss + // SRB2kart - Skin sounds {"kwin", false, 64, 96, -1, NULL, 0, SKSKWIN, -1, LUMPERROR, ""}, {"klose", false, 64, 96, -1, NULL, 0, SKSKLOSE, -1, LUMPERROR, ""}, diff --git a/src/sounds.h b/src/sounds.h index 532c844be..0aef7e7bc 100644 --- a/src/sounds.h +++ b/src/sounds.h @@ -1596,6 +1596,9 @@ typedef enum sfx_tmxbdn, sfx_tmxbup, + // SMS + sfx_sting0, + // And LASTLY, Kart's skin sounds. sfx_kwin, sfx_klose,