Fix "Going to CS_ZOMBIE for [clientname]" developer message

Client name was cleared before printing the message resulting in
a blank name.
This commit is contained in:
Zack Middleton 2018-04-03 21:30:36 -05:00
parent b61e2998f3
commit 3bf48877f3
1 changed files with 3 additions and 5 deletions

View File

@ -671,12 +671,7 @@ void SV_DropClient( client_t *drop, const char *reason ) {
if ( isBot ) { if ( isBot ) {
SV_BotFreeClient( drop - svs.clients ); 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. // bots shouldn't go zombie, as there's no real net connection.
drop->state = CS_FREE; drop->state = CS_FREE;
} else { } else {
@ -684,6 +679,9 @@ void SV_DropClient( client_t *drop, const char *reason ) {
drop->state = CS_ZOMBIE; // become free in a few seconds 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 // if this was the last client on the server, send a heartbeat
// to the master so it is known the server is empty // to the master so it is known the server is empty
// send a heartbeat now so the master will get up to date info // send a heartbeat now so the master will get up to date info