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

Function SV_UpdateServerCommandsToClient

code/server/sv_snapshot.cpp:204–213  ·  view source on GitHub ↗

================== SV_UpdateServerCommandsToClient (re)send all server commands the client hasn't acknowledged yet ================== */

Source from the content-addressed store, hash-verified

202==================
203*/
204static void SV_UpdateServerCommandsToClient( client_t *client, msg_t *msg ) {
205 int i;
206
207 // write any unacknowledged serverCommands
208 for ( i = client->reliableAcknowledge + 1 ; i <= client->reliableSequence ; i++ ) {
209 MSG_WriteByte( msg, svc_serverCommand );
210 MSG_WriteLong( msg, i );
211 MSG_WriteString( msg, client->reliableCommands[ i & (MAX_RELIABLE_COMMANDS-1) ] );
212 }
213}
214
215/*
216=============================================================================

Callers 1

SV_SendClientSnapshotFunction · 0.70

Calls 3

MSG_WriteByteFunction · 0.50
MSG_WriteLongFunction · 0.50
MSG_WriteStringFunction · 0.50

Tested by

no test coverage detected