From 3bf48877f3c626b8fe6416f63bea8fdc27ba8076 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Tue, 3 Apr 2018 21:30:36 -0500 Subject: [PATCH] Fix "Going to CS_ZOMBIE for [clientname]" developer message Client name was cleared before printing the message resulting in a blank name. --- code/server/sv_client.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/code/server/sv_client.c b/code/server/sv_client.c index b41421cc..62d6456e 100644 --- a/code/server/sv_client.c +++ b/code/server/sv_client.c @@ -671,12 +671,7 @@ void SV_DropClient( client_t *drop, const char *reason ) { if ( isBot ) { SV_BotFreeClient( drop - svs.clients ); - } - // nuke user info - SV_SetUserinfo( drop - svs.clients, "" ); - - if ( isBot ) { // bots shouldn't go zombie, as there's no real net connection. drop->state = CS_FREE; } else { @@ -684,6 +679,9 @@ void SV_DropClient( client_t *drop, const char *reason ) { drop->state = CS_ZOMBIE; // become free in a few seconds } + // nuke user info + SV_SetUserinfo( drop - svs.clients, "" ); + // if this was the last client on the server, send a heartbeat // to the master so it is known the server is empty // send a heartbeat now so the master will get up to date info