/* ================== SV_ClientEnterWorld ================== */ void SV_ClientEnterWorld( client_t *client, usercmd_t *cmd ) { int clientNum; sharedEntity_t *ent; Com_DPrintf( "Going from CS_PRIMED to CS_ACTIVE for %s\n", client->name ); client->state = CS_ACTIVE; // resend all configstrings using the cs commands since these are // no longer sent when the client is CS_PRIMED SV_UpdateConfigstrings( client ); // set up the entity for the client clientNum = client - svs.clients; ent = SV_GentityNum( clientNum ); ent->s.number = clientNum; client->gentity = ent; client->lastUserInfoChange = 0; //reset the delay client->lastUserInfoCount = 0; //reset the count client->deltaMessage = -1; client->nextSnapshotTime = svs.time; // generate a snapshot immediately if(cmd) memcpy(&client->lastUsercmd, cmd, sizeof(client->lastUsercmd)); else memset(&client->lastUsercmd, '\0', sizeof(client->lastUsercmd)); // call the game begin function GVM_ClientBegin( client - svs.clients ); SV_BeginAutoRecordDemos(); }
/* ================== SV_ClientEnterWorld ================== */ void SV_ClientEnterWorld( client_t *client, usercmd_t *cmd ) { int clientNum; sharedEntity_t *ent; Com_DPrintf( "Going from CS_PRIMED to CS_ACTIVE for %s\n", client->name ); client->state = CS_ACTIVE; // resend all configstrings using the cs commands since these are // no longer sent when the client is CS_PRIMED SV_UpdateConfigstrings( client ); // set up the entity for the client clientNum = client - svs.clients; ent = SV_GentityNum( clientNum ); ent->s.number = clientNum; client->gentity = ent; client->deltaMessage = -1; client->nextSnapshotTime = svs.time; // generate a snapshot immediately client->lastUsercmd = *cmd; // call the game begin function VM_Call( gvm, GAME_CLIENT_BEGIN, client - svs.clients ); }