diff options
author | Tim Angus <tim@ngus.net> | 2006-11-28 23:46:04 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2006-11-28 23:46:04 +0000 |
commit | 92905745a71578eed267f25311d7a18d49976f6d (patch) | |
tree | 5836f0a4424b938c6782190ec9c28c6be808f389 /src/server/sv_main.c | |
parent | 6af24abf02f1d0dedc5dbe655a37d5afc9f0646a (diff) |
* Merge ioq3-989
Diffstat (limited to 'src/server/sv_main.c')
-rw-r--r-- | src/server/sv_main.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/src/server/sv_main.c b/src/server/sv_main.c index c84e5ac3..2dc5a778 100644 --- a/src/server/sv_main.c +++ b/src/server/sv_main.c @@ -129,6 +129,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 @@ -186,9 +190,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 ); } } @@ -784,7 +785,15 @@ void SV_Frame( int msec ) { return; } - if ( !com_sv_running->integer ) { + if (!com_sv_running->integer) + { + if(com_dedicated->integer) + { + // Block indefinitely until something interesting happens + // on STDIN. + NET_Sleep(-1); + } + return; } @@ -797,7 +806,14 @@ void SV_Frame( int msec ) { if ( sv_fps->integer < 1 ) { Cvar_Set( "sv_fps", "10" ); } - frameMsec = 1000 / sv_fps->integer ; + + frameMsec = 1000 / sv_fps->integer * com_timescale->value; + // don't let it scale below 1ms + if(frameMsec < 1) + { + Cvar_Set("timescale", va("%f", sv_fps->integer / 1000.0f)); + frameMsec = 1; + } sv.timeResidual += msec; |