============== CL_CmdButtons ============== */
| 609 | ============== |
| 610 | */ |
| 611 | void CL_CmdButtons( usercmd_t *cmd ) { |
| 612 | int i; |
| 613 | |
| 614 | // |
| 615 | // figure button bits |
| 616 | // send a button bit even if the key was pressed and released in |
| 617 | // less than a frame |
| 618 | // |
| 619 | for (i = 0 ; i < 32 ; i++) { |
| 620 | if ( in_buttons[i].active || in_buttons[i].wasPressed ) { |
| 621 | cmd->buttons |= 1 << i; |
| 622 | } |
| 623 | in_buttons[i].wasPressed = qfalse; |
| 624 | } |
| 625 | |
| 626 | if ( Key_GetCatcher( ) ) { |
| 627 | //cmd->buttons |= BUTTON_TALK; |
| 628 | } |
| 629 | |
| 630 | // allow the game to know if any key at all is |
| 631 | // currently pressed, even if it isn't bound to anything |
| 632 | /* |
| 633 | if ( kg.anykeydown && Key_GetCatcher( ) == 0 ) { |
| 634 | cmd->buttons |= BUTTON_ANY; |
| 635 | } |
| 636 | */ |
| 637 | } |
| 638 | |
| 639 | |
| 640 | /* |
no test coverage detected