From b4a0e0a83f90e1aba62de3be89842f6d13582b0e Mon Sep 17 00:00:00 2001 From: toaster Date: Sun, 22 Jul 2018 17:39:09 +0100 Subject: [PATCH] Force the display of FREE PLAY on the pre-rankingsmode part of the intermission screen, since it's important to show what it was. When in rankingsmode, THAT'S when it's able to freely change with the number of players jumping in and out. --- src/y_inter.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/src/y_inter.c b/src/y_inter.c index 31ea8adec..318ffb229 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -262,6 +262,7 @@ static void Y_CalculateMatchData(boolean rankingsmode, void (*comparison)(INT32) // void Y_IntermissionDrawer(void) { + boolean forcefreeplay = false; INT32 i, whiteplayer = MAXPLAYERS, x = 4, hilicol = V_YELLOWMAP; // fallback if (intertype == int_none || rendermode == render_none) @@ -363,7 +364,16 @@ void Y_IntermissionDrawer(void) { INT32 y = 48; char name[MAXPLAYERNAME+1]; - const char *timeheader = (data.match.rankingsmode ? "RANK" : (intertype == int_race ? "TIME" : "SCORE")); + const char *timeheader; + + if (data.match.rankingsmode) + timeheader = "RANK"; + else + { + timeheader = (intertype == int_race ? "TIME" : "SCORE"); + if (data.match.numplayers <= 1) + forcefreeplay = true; + } // draw the level name V_DrawCenteredString(-4 + x + BASEVIDWIDTH/2, 20, 0, data.match.levelstring); @@ -484,13 +494,18 @@ dotimer: if (netgame) // FREE PLAY? { - // check to see if there's anyone else at all - for (i = 0; i < MAXPLAYERS; i++) + i = MAXPLAYERS; + + if (!forcefreeplay) { - if (i == consoleplayer) - continue; - if (playeringame[i] && !stplyr->spectator) - break; + // check to see if there's anyone else at all + for (i = 0; i < MAXPLAYERS; i++) + { + if (i == consoleplayer) + continue; + if (playeringame[i] && !stplyr->spectator) + break; + } } if (i == MAXPLAYERS)