From d14312830567a08580a552db5c4275a999ca6f1d Mon Sep 17 00:00:00 2001 From: Antonio Martinez Date: Fri, 10 Oct 2025 16:33:21 -0400 Subject: [PATCH] Whip awareness --- src/k_hud.cpp | 14 +++++++++++--- src/k_kart.c | 10 +++++++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/k_hud.cpp b/src/k_hud.cpp index a7d09232f..69e5b3098 100644 --- a/src/k_hud.cpp +++ b/src/k_hud.cpp @@ -4235,7 +4235,7 @@ static boolean K_drawKartLaps(void) K_DrawMarginSticker(fr-1+(flipflag ? 2 : 0), fy+1, 25+bump, V_HUDTRANS|V_SLIDEIN|splitflags, true, flipflag); // WHAT IS THIS? // WHAT ARE YOU FUCKING TALKING ABOUT? - + if (franticitems) { V_DrawMappedPatch(fr, fy, V_HUDTRANS|V_SLIDEIN|splitflags, kp_exp[1], R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_PURPLE, GTC_CACHE)); @@ -5135,7 +5135,7 @@ static void K_drawKartWanted(void) static void K_drawKartPlayerCheck(void) { - const fixed_t maxdistance = FixedMul(1280 * mapobjectscale, K_GetKartGameSpeedScalar(gamespeed)); + const fixed_t maxdistance = FixedMul(2000 * mapobjectscale, K_GetKartGameSpeedScalar(gamespeed)); UINT8 i; INT32 splitflags = V_SNAPTOBOTTOM|V_SPLITSCREEN; fixed_t y = CHEK_Y * FRACUNIT; @@ -5193,6 +5193,8 @@ static void K_drawKartPlayerCheck(void) distance = R_PointToDist2(pPos.x, pPos.y, v.x, v.y); + colormap = R_GetTranslationColormap(TC_DEFAULT, static_cast(checkplayer->mo->color), GTC_CACHE); + if (distance > maxdistance) { // Too far away @@ -5212,12 +5214,18 @@ static void K_drawKartPlayerCheck(void) { pnum += 2; } + else if ((checkplayer->instaWhipCharge) && !(cv_reducevfx.value)) + { + if (leveltime & 2) + R_GetTranslationColormap(TC_DEFAULT, static_cast(SKINCOLOR_WHITE), GTC_CACHE); + else + R_GetTranslationColormap(TC_DEFAULT, static_cast(SKINCOLOR_BLACK), GTC_CACHE); + } K_ObjectTracking(&result, &v, true); if (result.onScreen == true) { - colormap = R_GetTranslationColormap(TC_DEFAULT, static_cast(checkplayer->mo->color), GTC_CACHE); V_DrawFixedPatch(result.x, y, FRACUNIT, V_HUDTRANS|V_SPLITSCREEN|splitflags, kp_check[pnum], colormap); } } diff --git a/src/k_kart.c b/src/k_kart.c index fe67e3ff5..110293fbf 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -1486,6 +1486,14 @@ static void K_DrawDraftCombiring(player_t *player, mobj_t *victim, fixed_t curdi } band->color = colors[c]; + + if (player->instaWhipCharge && ((leveltime%2) == 0)) + { + band->color = SKINCOLOR_WHITE; + P_SetScale(band, band->destscale = (3*band->destscale) / 2); + } + + band->colorized = true; band->fuse = 2; @@ -14400,7 +14408,7 @@ void K_DappleEmployment(player_t *player) K_StumblePlayer(player); player->preventfailsafe = TICRATE*3; - S_StopSoundByID(player->mo, sfx_s3k9b); // Avoid stumble crunch noise + S_StopSoundByID(player->mo, sfx_s3k9b); // Avoid stumble crunch noise } } }