MCPcopy Create free account
hub / github.com/JACoders/OpenJK / CL_CmdButtons

Function CL_CmdButtons

code/client/cl_input.cpp:611–637  ·  view source on GitHub ↗

============== CL_CmdButtons ============== */

Source from the content-addressed store, hash-verified

609==============
610*/
611void 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/*

Callers 1

CL_CreateCmdFunction · 0.70

Calls 1

Key_GetCatcherFunction · 0.70

Tested by

no test coverage detected