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

Function CL_FinishMove

code/client/cl_input.cpp:645–668  ·  view source on GitHub ↗

============== CL_FinishMove ============== */

Source from the content-addressed store, hash-verified

643==============
644*/
645void CL_FinishMove( usercmd_t *cmd ) {
646 int i;
647
648 // copy the state that the cgame is currently sending
649 cmd->weapon = cl.cgameUserCmdValue;
650
651 if (cl.gcmdSendValue)
652 {
653 cmd->generic_cmd = cl.gcmdValue;
654 cl.gcmdSendValue = qfalse;
655 }
656 else
657 {
658 cmd->generic_cmd = 0;
659 }
660
661 // send the current server time so the amount of movement
662 // can be determined without allowing cheating
663 cmd->serverTime = cl.serverTime;
664
665 for (i=0 ; i<3 ; i++) {
666 cmd->angles[i] = ANGLE2SHORT(cl.viewangles[i]);
667 }
668}
669
670/*
671=================

Callers 1

CL_CreateCmdFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected