================== SV_ClientEnterWorld ================== */
| 242 | ================== |
| 243 | */ |
| 244 | void SV_ClientEnterWorld( client_t *client, usercmd_t *cmd, SavedGameJustLoaded_e eSavedGameJustLoaded ) { |
| 245 | int clientNum; |
| 246 | gentity_t *ent; |
| 247 | |
| 248 | Com_DPrintf ("SV_ClientEnterWorld() from %s\n", client->name); |
| 249 | client->state = CS_ACTIVE; |
| 250 | |
| 251 | // set up the entity for the client |
| 252 | clientNum = client - svs.clients; |
| 253 | ent = SV_GentityNum( clientNum ); |
| 254 | ent->s.number = clientNum; |
| 255 | client->gentity = ent; |
| 256 | |
| 257 | // normally I check 'qbFromSavedGame' to avoid overwriting loaded client data, but this stuff I want |
| 258 | // to be reset so that client packet delta-ing bgins afresh, rather than based on your previous frame |
| 259 | // (which didn't in fact happen now if we've just loaded from a saved game...) |
| 260 | // |
| 261 | client->deltaMessage = -1; |
| 262 | client->cmdNum = 0; |
| 263 | |
| 264 | // call the game begin function |
| 265 | ge->ClientBegin( client - svs.clients, cmd, eSavedGameJustLoaded ); |
| 266 | } |
| 267 | |
| 268 | /* |
| 269 | ============================================================ |
no test coverage detected