From 8845f36a3dfa9021ec95aad521f7ead51652b96c Mon Sep 17 00:00:00 2001 From: toaster Date: Mon, 22 May 2023 15:32:07 +0100 Subject: [PATCH] HU_DrawRankings: Adjust slightly - Only show `Lap 0/Lap 1` if numlaps > 1, to match other circumstances where laps aren't real - Only show player roundscore if gametype supports roundscore - Otherwise accept a blank right side of the player bar in custom gametypes. (one day for Lua..?) --- src/hu_stuff.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index fa366bd36..48725247e 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -2586,13 +2586,16 @@ static void HU_DrawRankings(void) #define strtime standings.strval[standings.numplayers] + standings.val[standings.numplayers] = 0; + strtime[0] = '\0'; + if (players[i].pflags & PF_NOCONTEST) { standings.val[standings.numplayers] = (UINT32_MAX-1); STRBUFCPY(strtime, "RETIRED."); } else if ((gametyperules & GTR_CIRCUIT)) - { + { standings.val[standings.numplayers] = players[i].laps; if (players[i].exiting) @@ -2600,12 +2603,12 @@ static void HU_DrawRankings(void) snprintf(strtime, sizeof strtime, "%i'%02i\"%02i", G_TicsToMinutes(players[i].realtime, true), G_TicsToSeconds(players[i].realtime), G_TicsToCentiseconds(players[i].realtime)); } - else + else if (numlaps > 1) { - snprintf(strtime, sizeof strtime, "Lap %d", standings.val[standings.numplayers]); + snprintf(strtime, sizeof strtime, "Lap %d", players[i].laps); } } - else + else if ((gametyperules & GTR_POINTLIMIT)) { standings.val[standings.numplayers] = players[i].roundscore; snprintf(strtime, sizeof strtime, "%d", standings.val[standings.numplayers]);