From 8dedc73c1124944cdda710fe5837a6bc95214df9 Mon Sep 17 00:00:00 2001 From: James R Date: Fri, 30 Jun 2023 21:26:39 -0700 Subject: [PATCH] Show point count next to rank icons HUD in Battle If the player has reached the point limit, the numbers dance and flash tangerine (indicating that they are about to win, after they kill someone). --- src/k_hud.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/k_hud.c b/src/k_hud.c index 7da0c34e0..bcd784306 100644 --- a/src/k_hud.c +++ b/src/k_hud.c @@ -2221,7 +2221,7 @@ static boolean K_drawKartPositionFaces(void) if ((gametyperules & GTR_BUMPERS) && (players[rankplayer[i]].pflags & PF_ELIMINATED)) V_DrawScaledPatch(FACE_X-4, Y-3, V_HUDTRANS|V_SLIDEIN|V_SNAPTOLEFT, kp_ranknobumpers); - else + else if (gametyperules & GTR_CIRCUIT) { INT32 pos = players[rankplayer[i]].position; if (pos < 0 || pos > MAXPLAYERS) @@ -2229,6 +2229,34 @@ static boolean K_drawKartPositionFaces(void) // Draws the little number over the face V_DrawScaledPatch(FACE_X-5, Y+10, V_HUDTRANS|V_SLIDEIN|V_SNAPTOLEFT, kp_facenum[pos]); } + else + { + INT32 flags = V_HUDTRANS | V_SLIDEIN | V_SNAPTOLEFT; + + colormap = NULL; + + if (g_pointlimit <= players[rankplayer[i]].roundscore) + { + if (leveltime % 8 < 4) + { + colormap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_TANGERINE, GTC_CACHE); + } + + flags |= V_STRINGDANCE; + } + + V_DrawStringScaled( + (FACE_X - 5) * FRACUNIT, + (Y + 10) * FRACUNIT, + FRACUNIT, + FRACUNIT, + FRACUNIT, + flags, + colormap, + PINGF_FONT, + va("%d", players[rankplayer[i]].roundscore) + ); + } Y -= 18; }