From 10925c8309af0350541ab8fb0188b96bd67d35ad Mon Sep 17 00:00:00 2001 From: zakk Date: Sat, 17 Sep 2005 01:36:38 +0000 Subject: Patch from Tim Angus, to fix a longstanding bug in the server, wherein running the server for more than 24 hours would cause the game to exhibit weirdness as described here: http://forums.wireheadstudios.org/index.php?act=ST&f=11&t=2749 That page would also indicate that more work needs to be done if the map isn't going to change for more than 24 hours. git-svn-id: svn://svn.icculus.org/quake3/trunk@91 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/server/sv_main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'code/server/sv_main.c') diff --git a/code/server/sv_main.c b/code/server/sv_main.c index e83ce19..0d3f96c 100644 --- a/code/server/sv_main.c +++ b/code/server/sv_main.c @@ -785,7 +785,7 @@ void SV_Frame( int msec ) { sv.timeResidual += msec; - if (!com_dedicated->integer) SV_BotFrame( svs.time + sv.timeResidual ); + if (!com_dedicated->integer) SV_BotFrame (sv.time + sv.timeResidual); if ( com_dedicated->integer && sv.timeResidual < frameMsec ) { // NET_Sleep will give the OS time slices until either get a packet @@ -835,15 +835,16 @@ void SV_Frame( int msec ) { // update ping based on the all received frames SV_CalcPings(); - if (com_dedicated->integer) SV_BotFrame( svs.time ); + if (com_dedicated->integer) SV_BotFrame (sv.time); // run the game simulation in chunks while ( sv.timeResidual >= frameMsec ) { sv.timeResidual -= frameMsec; svs.time += frameMsec; + sv.time += frameMsec; // let everything in the world think and move - VM_Call( gvm, GAME_RUN_FRAME, svs.time ); + VM_Call (gvm, GAME_RUN_FRAME, sv.time); } if ( com_speeds->integer ) { -- cgit v1.2.3