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).
This commit is contained in:
James R 2023-06-30 21:26:39 -07:00
parent c042c6e5dc
commit 8dedc73c11

View file

@ -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;
}