From 8a62e0ab89412c45f2590083da63ceb0d0c62d7c Mon Sep 17 00:00:00 2001 From: thilo Date: Sat, 26 Aug 2006 12:43:38 +0000 Subject: Correctly handle 0 timescale git-svn-id: svn://svn.icculus.org/quake3/trunk@873 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/server/sv_main.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'code/server') diff --git a/code/server/sv_main.c b/code/server/sv_main.c index b6f11b6..a343c51 100644 --- a/code/server/sv_main.c +++ b/code/server/sv_main.c @@ -798,7 +798,14 @@ void SV_Frame( int msec ) { if ( sv_fps->integer < 1 ) { Cvar_Set( "sv_fps", "10" ); } + 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; -- cgit v1.2.3