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

Function CL_SendCmd

code/client/cl_input.cpp:912–932  ·  view source on GitHub ↗

================= CL_SendCmd Called every frame to builds and sends a command packet to the server. ================= */

Source from the content-addressed store, hash-verified

910=================
911*/
912void CL_SendCmd( void ) {
913 // don't send any message if not connected
914 if ( cls.state < CA_CONNECTED ) {
915 return;
916 }
917
918 // don't send commands if paused
919 if ( com_sv_running->integer && sv_paused->integer && cl_paused->integer ) {
920 return;
921 }
922
923 // we create commands even if a demo is playing,
924 CL_CreateNewCommands();
925
926 // don't send a packet if the last packet was sent too recently
927 if ( !CL_ReadyToSendPacket() ) {
928 return;
929 }
930
931 CL_WritePacket();
932}
933
934
935/*

Callers 1

CL_FrameFunction · 0.70

Calls 3

CL_CreateNewCommandsFunction · 0.70
CL_ReadyToSendPacketFunction · 0.70
CL_WritePacketFunction · 0.70

Tested by

no test coverage detected