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

Function SV_ClientCommand

code/server/sv_client.cpp:358–381  ·  view source on GitHub ↗

=============== SV_ClientCommand =============== */

Source from the content-addressed store, hash-verified

356===============
357*/
358static void SV_ClientCommand( client_t *cl, msg_t *msg ) {
359 int seq;
360 const char *s;
361
362 seq = MSG_ReadLong( msg );
363 s = MSG_ReadString( msg );
364
365 // see if we have already executed it
366 if ( cl->lastClientCommand >= seq ) {
367 return;
368 }
369
370 Com_DPrintf( "clientCommand: %s : %i : %s\n", cl->name, seq, s );
371
372 // drop the connection if we have somehow lost commands
373 if ( seq > cl->lastClientCommand + 1 ) {
374 Com_Printf( "Client %s lost %i clientCommands\n", cl->name,
375 seq - cl->lastClientCommand + 1 );
376 }
377
378 SV_ExecuteClientCommand( cl, s );
379
380 cl->lastClientCommand = seq;
381}
382
383
384//==================================================================================

Callers 1

SV_ExecuteClientMessageFunction · 0.70

Calls 5

SV_ExecuteClientCommandFunction · 0.70
MSG_ReadLongFunction · 0.50
MSG_ReadStringFunction · 0.50
Com_DPrintfFunction · 0.50
Com_PrintfFunction · 0.50

Tested by

no test coverage detected