=============== SV_ClientCommand =============== */
| 356 | =============== |
| 357 | */ |
| 358 | static void SV_ClientCommand( client_t *cl, msg_t *msg ) { |
| 359 | int seq; |
| 360 | const char *s; |
| 361 | |
| 362 | seq = MSG_ReadLong( msg ); |
| 363 | s = MSG_ReadString( msg ); |
| 364 | |
| 365 | // see if we have already executed it |
| 366 | if ( cl->lastClientCommand >= seq ) { |
| 367 | return; |
| 368 | } |
| 369 | |
| 370 | Com_DPrintf( "clientCommand: %s : %i : %s\n", cl->name, seq, s ); |
| 371 | |
| 372 | // drop the connection if we have somehow lost commands |
| 373 | if ( seq > cl->lastClientCommand + 1 ) { |
| 374 | Com_Printf( "Client %s lost %i clientCommands\n", cl->name, |
| 375 | seq - cl->lastClientCommand + 1 ); |
| 376 | } |
| 377 | |
| 378 | SV_ExecuteClientCommand( cl, s ); |
| 379 | |
| 380 | cl->lastClientCommand = seq; |
| 381 | } |
| 382 | |
| 383 | |
| 384 | //================================================================================== |
no test coverage detected