diff options
author | tjw <tjw@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2006-10-13 19:44:52 +0000 |
---|---|---|
committer | tjw <tjw@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2006-10-13 19:44:52 +0000 |
commit | 363a60b9d4c01225deefacb23586f9c51739d434 (patch) | |
tree | ad8e32f2fb8bd1af48958450d00d3f9bc97d2243 /code/server/sv_main.c | |
parent | e6588d96c8e2603c51dc79a708864e0d0726f7d4 (diff) | |
download | ioquake3-aero-363a60b9d4c01225deefacb23586f9c51739d434.tar.gz ioquake3-aero-363a60b9d4c01225deefacb23586f9c51739d434.zip |
* (bug 2784) help to prevent reliable command overflow in cases when a slow
client is loading the map on a busy server. Specifically, hold back all
configstring update commands while the client is CS_PRIMED. Once the
client goes from CS_PRIMED to CS_ACTIVE, send the cleint commands for
updating each of the configstring indexes which were updated while the
client was CS_PRIMED.
git-svn-id: svn://svn.icculus.org/quake3/trunk@935 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/server/sv_main.c')
-rw-r--r-- | code/server/sv_main.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/code/server/sv_main.c b/code/server/sv_main.c index a343c51..ed07b87 100644 --- a/code/server/sv_main.c +++ b/code/server/sv_main.c @@ -135,6 +135,10 @@ void SV_AddServerCommand( client_t *client, const char *cmd ) { // return; // } + // 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 @@ -193,9 +197,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 ); } } |