From 0e8a32612fbc4bb9271caf1d097d93dff9342824 Mon Sep 17 00:00:00 2001 From: Alug Date: Sat, 8 Aug 2026 17:26:14 +0200 Subject: [PATCH] move player_name init to D_RegisterServerCommands runs before registering client commands and is for everything server + client needs --- src/d_netcmd.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index dccbbd345..f08d0d2c8 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -604,6 +604,12 @@ void D_RegisterServerCommands(void) Forceskin_cons_t[i].value = 0; Forceskin_cons_t[i].strvalue = NULL; } + + // Set default player names + // Monster Iestyn (12/08/19): not sure where else I could have actually put this, but oh well + for (i = 0; i < MAXPLAYERS; i++) + sprintf(player_names[i], "Player %d", 1 + i); + RegisterNetXCmd(XD_NAMEANDCOLOR, Got_NameAndColor); RegisterNetXCmd(XD_WEAPONPREF, Got_WeaponPref); RegisterNetXCmd(XD_MAP, Got_Mapcmd); @@ -815,11 +821,6 @@ void D_RegisterClientCommands(void) Color_cons_t[MAXSKINCOLORS].value = 0; Color_cons_t[MAXSKINCOLORS].strvalue = NULL; - // Set default player names - // Monster Iestyn (12/08/19): not sure where else I could have actually put this, but oh well - for (i = 0; i < MAXPLAYERS; i++) - sprintf(player_names[i], "Player %d", i); - if (dedicated) return;