mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
clear the player slots properly when disconnecting
This commit is contained in:
parent
f061c47242
commit
42ade2c507
2 changed files with 6 additions and 4 deletions
|
@ -492,11 +492,11 @@ CL_Disconnect (void)
|
|||
Team_ResetTimers ();
|
||||
|
||||
// remove player info strings
|
||||
for (i = 0; i < MAX_CLIENTS; i++)
|
||||
if (cl.players[i].userinfo) {
|
||||
for (i = 0; i < MAX_CLIENTS; i++) {
|
||||
if (cl.players[i].userinfo)
|
||||
Info_Destroy (cl.players[i].userinfo);
|
||||
cl.players[i].userinfo = 0;
|
||||
}
|
||||
memset (&cl.players[i], 0, sizeof (cl.players[i]));
|
||||
}
|
||||
cl.worldmodel = NULL;
|
||||
cl.validsequence = 0;
|
||||
}
|
||||
|
|
|
@ -1040,6 +1040,8 @@ CL_UpdateUserinfo (void)
|
|||
CL_ProcessUserInfo (slot, player);
|
||||
} else {
|
||||
// the server dropped the client
|
||||
if (player->userinfo)
|
||||
Info_Destroy (player->userinfo);
|
||||
memset (player, 0, sizeof (*player));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue