From b3be7bcedc5de55cbca6ab6aec395e936255c6f2 Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 24 Nov 2025 18:19:46 +0100 Subject: [PATCH] Player Infoscreen: if availible, display player names in their skincolor we hijack the playerinfo data field for this, and pray to the kart gods this is unused on the ms --- src/d_clisrv.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 4626e3603..cb5c003ae 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -1401,10 +1401,16 @@ static inline void CL_DrawConnectionStatus(void) if (playerinfo[i].node < 255) { strncpy(player_name, playerinfo[i].name, MAXPLAYERNAME); - V_DrawThinString(x + 10, y, V_ALLOWLOWERCASE|V_6WIDTHSPACE, player_name); + + // if we get a skin color + // try to colourize the player name + if (playerinfo[i].data > 0 && playerinfo[i].data < MAXSKINCOLORS) + V_DrawThinString(x + 10, y, V_ALLOWLOWERCASE|V_6WIDTHSPACE, va("%s%s ", HU_SkinColorToConsoleColor(playerinfo[i].data), player_name)); + else + V_DrawThinString(x + 10, y, V_ALLOWLOWERCASE|V_6WIDTHSPACE, player_name); if (playerinfo[i].team == 0) { statuscolor = 184; } // playing - if (playerinfo[i].data & 0x20) { statuscolor = 86; } // tag IT + //if (playerinfo[i].data & 0x20) { statuscolor = 86; } // tag IT if (playerinfo[i].team == 1) { statuscolor = 128; } // ctf red team if (playerinfo[i].team == 2) { statuscolor = 232; } // ctf blue team if (playerinfo[i].team == 255) { statuscolor = 16; } // spectator or non-team @@ -1747,16 +1753,19 @@ static void SV_SendPlayerInfo(INT32 node) // Extra data // Kart has extra skincolors, so we can't use this - netbuffer->u.playerinfo[i].data = 0; //netbuffer->u.playerinfo[i].data = players[i].skincolor; + //netbuffer->u.playerinfo[i].data = 0; //netbuffer->u.playerinfo[i].data = players[i].skincolor; - if (players[i].pflags & PF_TAGIT) - netbuffer->u.playerinfo[i].data |= 0x20; + // well why not, we only got like 100 of these? + netbuffer->u.playerinfo[i].data = players[i].skincolor; - if (players[i].gotflag) - netbuffer->u.playerinfo[i].data |= 0x40; + //if (players[i].pflags & PF_TAGIT) + //netbuffer->u.playerinfo[i].data |= 0x20; - if (players[i].powers[pw_super]) - netbuffer->u.playerinfo[i].data |= 0x80; + //if (players[i].gotflag) + //netbuffer->u.playerinfo[i].data |= 0x40; + + //if (players[i].powers[pw_super]) + //netbuffer->u.playerinfo[i].data |= 0x80; } HSendPacket(node, false, 0, sizeof(plrinfo) * MSCOMPAT_MAXPLAYERS);