From 38f5c3044e0079e991cc9161e9c3db30e702e217 Mon Sep 17 00:00:00 2001 From: yamamama Date: Sun, 7 Dec 2025 03:19:05 -0500 Subject: [PATCH] Format the list display slightly better Instead of awkwardly listing off the names offset of the current... why not just do that for the longest name? --- src/y_inter.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/y_inter.c b/src/y_inter.c index 851d30819..643169eb4 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -621,13 +621,25 @@ void Y_IntermissionDrawer(void) y2 = y; INT32 slen = 0; + INT32 slen_temp = slen; if (manyplayers16) V_DrawThinString(x+18, y, hilicol|V_ALLOWLOWERCASE|V_6WIDTHSPACE, strtime); else if (displayitemrolls) { V_DrawSmallString(xx, y2 + 1, ((data.num[i] == whiteplayer) ? hilicol : 0)|V_ALLOWLOWERCASE|V_6WIDTHSPACE, strtime); - slen = V_SmallStringWidth(strtime, ((data.num[i] == whiteplayer) ? hilicol : 0)|V_ALLOWLOWERCASE|V_6WIDTHSPACE); + + // Get the longest string size. This is... gross. + INT32 ii; + + for (ii = 0; ii < data.numplayers; ii++) + { + if (data.num[ii] != MAXPLAYERS && playeringame[data.num[ii]] && !players[data.num[ii]].spectator) + { + slen_temp = V_SmallStringWidth(data.name[ii], ((data.num[ii] == whiteplayer) ? hilicol : 0)|V_ALLOWLOWERCASE|V_6WIDTHSPACE); + slen = ((slen_temp > slen) ? slen_temp : slen); + } + } } else if (manyplayers8) {