From 7669ae7bdea43d1427dd82b8aa2445559c6eb7c9 Mon Sep 17 00:00:00 2001 From: James R Date: Tue, 7 Mar 2023 23:01:56 -0800 Subject: [PATCH] Rankings HUD and minimap check for PF_ELIMINATED Dying to the Barrier: - crosses out your rankings icon - hides your minimap icon --- src/k_hud.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/k_hud.c b/src/k_hud.c index c68bbaa07..d4e305156 100644 --- a/src/k_hud.c +++ b/src/k_hud.c @@ -2025,7 +2025,7 @@ static boolean K_drawKartPositionFaces(void) if (i == strank) V_DrawScaledPatch(FACE_X, Y, V_HUDTRANS|V_SLIDEIN|V_SNAPTOLEFT, kp_facehighlight[(leveltime / 4) % 8]); - if ((gametyperules & GTR_BUMPERS) && players[rankplayer[i]].mo->health <= 0) + 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 { @@ -2358,7 +2358,7 @@ void K_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, IN if (tab[i].num == whiteplayer) V_DrawScaledPatch(x, y-4, 0, kp_facehighlight[(leveltime / 4) % 8]); - if ((gametyperules & GTR_BUMPERS) && players[tab[i].num].mo->health <= 0) + if ((gametyperules & GTR_BUMPERS) && (players[tab[i].num].pflags & PF_ELIMINATED)) V_DrawScaledPatch(x-4, y-7, 0, kp_ranknobumpers); else { @@ -3640,6 +3640,10 @@ static void K_drawKartMinimap(void) if (!players[i].mo || players[i].spectator || !players[i].mo->skin || players[i].exiting) continue; + // This player is out of the game! + if ((gametyperules & GTR_BUMPERS) && (players[i].pflags & PF_ELIMINATED)) + continue; + if (i == displayplayers[0] || i == displayplayers[1] || i == displayplayers[2] || i == displayplayers[3]) { // Draw display players on top of everything else @@ -3647,10 +3651,6 @@ static void K_drawKartMinimap(void) continue; } - // Now we know it's not a display player, handle non-local player exceptions. - if ((gametyperules & GTR_BUMPERS) && players[i].mo->health <= 0) - continue; - if (players[i].hyudorotimer > 0) { if (!((players[i].hyudorotimer < TICRATE/2