=================== SV_ExecuteClientMessage Parse a client packet =================== */
| 540 | =================== |
| 541 | */ |
| 542 | void SV_ExecuteClientMessage( client_t *cl, msg_t *msg ) { |
| 543 | int c; |
| 544 | |
| 545 | while( 1 ) { |
| 546 | if ( msg->readcount > msg->cursize ) { |
| 547 | SV_DropClient (cl, "had a badread"); |
| 548 | return; |
| 549 | } |
| 550 | |
| 551 | c = MSG_ReadByte( msg ); |
| 552 | if ( c == -1 ) { |
| 553 | break; |
| 554 | } |
| 555 | |
| 556 | switch( c ) { |
| 557 | default: |
| 558 | SV_DropClient( cl,"had an unknown command char" ); |
| 559 | return; |
| 560 | |
| 561 | case clc_nop: |
| 562 | break; |
| 563 | |
| 564 | case clc_move: |
| 565 | SV_UserMove( cl, msg ); |
| 566 | break; |
| 567 | |
| 568 | case clc_clientCommand: |
| 569 | SV_ClientCommand( cl, msg ); |
| 570 | if (cl->state == CS_ZOMBIE) { |
| 571 | return; // disconnect command |
| 572 | } |
| 573 | break; |
| 574 | } |
| 575 | } |
| 576 | } |
| 577 | |
| 578 | |
| 579 | void SV_FreeClient(client_t *client) |
no test coverage detected