From 97e261f443946fa63f95b6c7fcdc4eefca35f4f8 Mon Sep 17 00:00:00 2001 From: toaster Date: Fri, 22 May 2020 21:27:55 +0100 Subject: [PATCH] Fix some issues with the tab rankings and end screen that bots exposed. * Laps now have an initial zero instead of being directly indexed from 1, so start counting from there. * Clean up the circumstances under which LAGLESS! is shown next to a name - specifically removing it from both non-netgames in general, and bots in netgames. * Fix `(powertype == -1)` being broken on the intermission drawer, which was especially obvious with bots outside of netgames. --- src/hu_stuff.c | 2 +- src/k_kart.c | 2 +- src/y_inter.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index a4acabf79..7338a232b 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -3095,7 +3095,7 @@ static void HU_DrawRankings(void) if (G_RaceGametype()) { if (circuitmap) - tab[scorelines].count = players[i].laps+1; + tab[scorelines].count = players[i].laps; else tab[scorelines].count = players[i].realtime; } diff --git a/src/k_kart.c b/src/k_kart.c index de653e9b0..a8ddef8f0 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -9434,7 +9434,7 @@ void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, I y2 = y; - if (playerconsole[tab[i].num] == 0 && server_lagless) + if (netgame && playerconsole[tab[i].num] == 0 && server_lagless && !players[tab[i].num].bot) { y2 = ( y - 4 ); diff --git a/src/y_inter.c b/src/y_inter.c index d3ef26fdd..1051a7e55 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -440,7 +440,7 @@ void Y_IntermissionDrawer(void) int y2; if (data.match.rankingsmode) - timeheader = "PWR.LV"; + timeheader = (powertype != -1 ? "PWR.LV" : "RANK"); else timeheader = ((intertype == int_race || (intertype == int_match && battlecapsules)) ? "TIME" : "SCORE"); @@ -497,7 +497,7 @@ void Y_IntermissionDrawer(void) y2 = y; - if (playerconsole[data.match.num[i]] == 0 && server_lagless) + if (netgame && playerconsole[data.match.num[i]] == 0 && server_lagless && !players[data.match.num[i]].bot) { static int alagles_timer = 0; patch_t *alagles; @@ -533,7 +533,7 @@ void Y_IntermissionDrawer(void) if (data.match.rankingsmode) { - if (!clientpowerlevels[data.match.num[i]][powertype]) // No power level (splitscreen guests) + if (powertype != -1 && !clientpowerlevels[data.match.num[i]][powertype]) // No power level (splitscreen guests) STRBUFCPY(strtime, "----"); else {