Skip to content

Commit

Permalink
Fix "Going to CS_ZOMBIE for [clientname]" developer message
Browse files Browse the repository at this point in the history
Client name was cleared before printing the message resulting in
a blank name.
  • Loading branch information
zturtleman committed Apr 4, 2018
1 parent b61e299 commit 3bf4887
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions code/server/sv_client.c
Expand Up @@ -671,19 +671,17 @@ 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 {
Com_DPrintf( "Going to CS_ZOMBIE for %s\n", drop->name );
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
Expand Down

0 comments on commit 3bf4887

Please sign in to comment.