Fix hanging client when map_restart executed on the server while client is still loading the map

This commit is contained in:
Thilo Schulz 2011-01-27 16:40:15 +00:00
parent d1c0401c73
commit de0e3cba34
2 changed files with 14 additions and 4 deletions

View file

@ -715,7 +715,11 @@ void SV_ClientEnterWorld( client_t *client, usercmd_t *cmd ) {
client->deltaMessage = -1;
client->nextSnapshotTime = svs.time; // generate a snapshot immediately
client->lastUsercmd = *cmd;
if(cmd)
memcpy(&client->lastUsercmd, cmd, sizeof(client->lastUsercmd));
else
memset(&client->lastUsercmd, '\0', sizeof(client->lastUsercmd));
// call the game begin function
VM_Call( gvm, GAME_CLIENT_BEGIN, client - svs.clients );