From e118ec939968579ec1eb311ef0fe0dc5fd9740f0 Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Tue, 29 Jan 2019 13:27:43 -0500 Subject: [PATCH 1/6] Remove CV_HIDEN flag for serversort --- src/m_menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/m_menu.c b/src/m_menu.c index f0831a17..f337f1b4 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -443,7 +443,7 @@ static CV_PossibleValue_t serversort_cons_t[] = { {5,"Gametype"}, {0,NULL} }; -consvar_t cv_serversort = {"serversort", "Ping", CV_HIDEN | CV_CALL, serversort_cons_t, M_SortServerList, 0, NULL, NULL, 0, 0, NULL}; +consvar_t cv_serversort = {"serversort", "Ping", CV_CALL, serversort_cons_t, M_SortServerList, 0, NULL, NULL, 0, 0, NULL}; // autorecord demos for time attack static consvar_t cv_autorecord = {"autorecord", "Yes", 0, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL}; From c1fde7bfb7c2692b2cf81ef3e869a8e8e5f2e286 Mon Sep 17 00:00:00 2001 From: Sally Cochenour Date: Wed, 30 Jan 2019 01:21:20 -0500 Subject: [PATCH 2/6] Thin the rest of this screen's stuff too --- src/k_kart.c | 24 ++++++++++++++++++------ src/y_inter.c | 30 ++++++++++++++++++++++-------- 2 files changed, 40 insertions(+), 14 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 0410a931..dde4849e 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -7145,12 +7145,24 @@ void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, I if (G_RaceGametype()) { #define timestring(time) va("%i'%02i\"%02i", G_TicsToMinutes(time, true), G_TicsToSeconds(time), G_TicsToCentiseconds(time)) - if (players[tab[i].num].exiting) - V_DrawRightAlignedString(x+rightoffset, y, hilicol, timestring(players[tab[i].num].realtime)); - else if (players[tab[i].num].pflags & PF_TIMEOVER) - V_DrawRightAlignedThinString(x+rightoffset, y-1, 0, "NO CONTEST."); - else if (circuitmap) - V_DrawRightAlignedString(x+rightoffset, y, 0, va("Lap %d", tab[i].count)); + if (scorelines > 8) + { + if (players[tab[i].num].exiting) + V_DrawRightAlignedThinString(x+rightoffset, y-1, hilicol|V_6WIDTHSPACE, timestring(players[tab[i].num].realtime)); + else if (players[tab[i].num].pflags & PF_TIMEOVER) + V_DrawRightAlignedThinString(x+rightoffset, y-1, V_6WIDTHSPACE, "NO CONTEST."); + else if (circuitmap) + V_DrawRightAlignedThinString(x+rightoffset, y-1, V_6WIDTHSPACE, va("Lap %d", tab[i].count)); + } + else + { + if (players[tab[i].num].exiting) + V_DrawRightAlignedString(x+rightoffset, y, hilicol, timestring(players[tab[i].num].realtime)); + else if (players[tab[i].num].pflags & PF_TIMEOVER) + V_DrawRightAlignedThinString(x+rightoffset, y-1, 0, "NO CONTEST."); + else if (circuitmap) + V_DrawRightAlignedString(x+rightoffset, y, 0, va("Lap %d", tab[i].count)); + } #undef timestring } else diff --git a/src/y_inter.c b/src/y_inter.c index a8b1f740..31960a08 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -432,7 +432,7 @@ void Y_IntermissionDrawer(void) if (data.match.encore) V_DrawCenteredString(-4 + x + BASEVIDWIDTH/2, 12-8, hilicol, "ENCORE MODE"); - if (!gutter) + if (data.match.numplayers > NUMFORNEWCOLUMN) { V_DrawFill(x+156, 24, 1, 158, 0); V_DrawFill((x-3) - duptweak, 182, dupadjust-2, 1, 0); @@ -476,8 +476,8 @@ void Y_IntermissionDrawer(void) STRBUFCPY(strtime, data.match.name[i]); - if (!gutter) - V_DrawThinString(x+36, y, ((data.match.num[i] == whiteplayer) ? hilicol : 0)|V_ALLOWLOWERCASE|V_6WIDTHSPACE, strtime); + if (data.match.numplayers > NUMFORNEWCOLUMN) + V_DrawThinString(x+36, y-1, ((data.match.num[i] == whiteplayer) ? hilicol : 0)|V_ALLOWLOWERCASE|V_6WIDTHSPACE, strtime); else V_DrawString(x+36, y, ((data.match.num[i] == whiteplayer) ? hilicol : 0)|V_ALLOWLOWERCASE, strtime); @@ -490,17 +490,23 @@ void Y_IntermissionDrawer(void) else snprintf(strtime, sizeof strtime, "(+ %d)", data.match.increase[data.match.num[i]]); - V_DrawRightAlignedString(x+120+gutter, y, 0, strtime); + if (data.match.numplayers > NUMFORNEWCOLUMN) + V_DrawRightAlignedThinString(x+135+gutter, y-1, V_6WIDTHSPACE, strtime); + else + V_DrawRightAlignedString(x+120+gutter, y, 0, strtime); } snprintf(strtime, sizeof strtime, "%d", data.match.val[i]); - V_DrawRightAlignedString(x+152+gutter, y, 0, strtime); + if (data.match.numplayers > NUMFORNEWCOLUMN) + V_DrawRightAlignedThinString(x+152+gutter, y-1, V_6WIDTHSPACE, strtime); + else + V_DrawRightAlignedString(x+152+gutter, y, 0, strtime); } else { if (data.match.val[i] == (UINT32_MAX-1)) - V_DrawRightAlignedThinString(x+152+gutter, y-1, 0, "NO CONTEST."); + V_DrawRightAlignedThinString(x+152+gutter, y-1, (data.match.numplayers > NUMFORNEWCOLUMN ? V_6WIDTHSPACE : 0), "NO CONTEST."); else { if (intertype == int_race) @@ -509,10 +515,18 @@ void Y_IntermissionDrawer(void) G_TicsToSeconds(data.match.val[i]), G_TicsToCentiseconds(data.match.val[i])); strtime[sizeof strtime - 1] = '\0'; - V_DrawRightAlignedString(x+152+gutter, y, 0, strtime); + if (data.match.numplayers > NUMFORNEWCOLUMN) + V_DrawRightAlignedThinString(x+152+gutter, y-1, V_6WIDTHSPACE, strtime); + else + V_DrawRightAlignedString(x+152+gutter, y, 0, strtime); } else - V_DrawRightAlignedString(x+152+gutter, y, 0, va("%i", data.match.val[i])); + { + if (data.match.numplayers > NUMFORNEWCOLUMN) + V_DrawRightAlignedThinString(x+152+gutter, y-1, V_6WIDTHSPACE, va("%i", data.match.val[i])); + else + V_DrawRightAlignedString(x+152+gutter, y, 0, va("%i", data.match.val[i])); + } } } From 9ddea94590167a82d9303ec992e8eef7865de5e3 Mon Sep 17 00:00:00 2001 From: wolfy852 Date: Thu, 31 Jan 2019 19:15:28 -0600 Subject: [PATCH 3/6] Potentially fix 64-bit builds crashing on certain replays --- src/g_game.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index d8022e08..dcd67b40 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -5141,15 +5141,13 @@ void G_GhostTicker(void) for (i = 0; i < count; i++) { g->p += 4; // reserved - type = READUINT32(g->p); + demo_p += 4; // backwards compat. health = READUINT16(g->p); x = READFIXED(g->p); y = READFIXED(g->p); z = READFIXED(g->p); angle = READANGLE(g->p); - if (!(mobjinfo[type].flags & MF_SHOOTABLE) - || !(mobjinfo[type].flags & (MF_ENEMY|MF_MONITOR)) - || health != 0 || i >= 4) // only spawn for the first 4 hits per frame, to prevent ghosts from splode-spamming too bad. + if (health != 0 || i >= 4) // only spawn for the first 4 hits per frame, to prevent ghosts from splode-spamming too bad. continue; poof = P_SpawnMobj(x, y, z, MT_GHOST); poof->angle = angle; From 7c18d130f23da29b8d07bb89b3da83df6723b605 Mon Sep 17 00:00:00 2001 From: wolfy852 Date: Thu, 31 Jan 2019 23:21:00 -0600 Subject: [PATCH 4/6] Fix replay weirdness Sryder's Pleasure Castle ghost tries to return to England with this line. --- src/g_game.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/g_game.c b/src/g_game.c index dcd67b40..58f8b0d9 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -5141,7 +5141,7 @@ void G_GhostTicker(void) for (i = 0; i < count; i++) { g->p += 4; // reserved - demo_p += 4; // backwards compat. + type = READUINT32(g->p); health = READUINT16(g->p); x = READFIXED(g->p); y = READFIXED(g->p); From b5b4e1fcc88b417f3054fd2332a6c8bcbda363e5 Mon Sep 17 00:00:00 2001 From: wolfy852 Date: Fri, 1 Feb 2019 15:42:29 -0600 Subject: [PATCH 5/6] Skip over type CORRECTLY, this time. --- src/g_game.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/g_game.c b/src/g_game.c index 58f8b0d9..7cddad08 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -5141,7 +5141,7 @@ void G_GhostTicker(void) for (i = 0; i < count; i++) { g->p += 4; // reserved - type = READUINT32(g->p); + g->p += 4; // backwards compat., type used to be here health = READUINT16(g->p); x = READFIXED(g->p); y = READFIXED(g->p); From 85f3be58895aea1d68adf31fd126d849db601627 Mon Sep 17 00:00:00 2001 From: wolfy852 Date: Fri, 1 Feb 2019 15:45:53 -0600 Subject: [PATCH 6/6] Comment out type --- src/g_game.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/g_game.c b/src/g_game.c index 7cddad08..df7119c3 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -5134,7 +5134,7 @@ void G_GhostTicker(void) if (ziptic & EZT_HIT) { // Spawn hit poofs for killing things! UINT16 i, count = READUINT16(g->p), health; - UINT32 type; + //UINT32 type; fixed_t x,y,z; angle_t angle; mobj_t *poof;