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

Function CL_ParseCommandString

code/client/cl_parse.cpp:460–479  ·  view source on GitHub ↗

===================== CL_ParseCommandString Command strings are just saved off until cgame asks for them when it transitions a snapshot ===================== */

Source from the content-addressed store, hash-verified

458=====================
459*/
460void CL_ParseCommandString( msg_t *msg ) {
461 char *s;
462 int seq;
463 int index;
464
465 seq = MSG_ReadLong( msg );
466 s = MSG_ReadString( msg );
467
468 // see if we have already executed stored it off
469 if ( clc.serverCommandSequence >= seq ) {
470 return;
471 }
472 clc.serverCommandSequence = seq;
473
474 index = seq & (MAX_RELIABLE_COMMANDS-1);
475 if ( clc.serverCommands[ index ] ) {
476 Z_Free( clc.serverCommands[ index ] );
477 }
478 clc.serverCommands[ index ] = CopyString( s );
479}
480
481
482/*

Callers 1

CL_ParseServerMessageFunction · 0.70

Calls 4

MSG_ReadLongFunction · 0.50
MSG_ReadStringFunction · 0.50
Z_FreeFunction · 0.50
CopyStringFunction · 0.50

Tested by

no test coverage detected