Skip to content

Commit

Permalink
[MP] Move server command state check to SV_AddServerCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
ensiform committed Feb 14, 2015
1 parent b572827 commit c0e9b76
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions codemp/server/sv_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ not have future snapshot_t executed before it is executed
void SV_AddServerCommand( client_t *client, const char *cmd ) {
int index, i;

// do not send commands until the gamestate has been sent
if ( client->state < CS_PRIMED ) {
return;
}

client->reliableSequence++;
// if we would be losing an old command that hasn't been acknowledged,
// we must drop the connection
Expand Down Expand Up @@ -147,9 +152,6 @@ void QDECL SV_SendServerCommand(client_t *cl, const char *fmt, ...) {

// send the data to all relevent clients
for (j = 0, client = svs.clients; j < sv_maxclients->integer ; j++, client++) {
if ( client->state < CS_PRIMED ) {
continue;
}
SV_AddServerCommand( client, (char *)message );
}
}
Expand Down

0 comments on commit c0e9b76

Please sign in to comment.