aboutsummaryrefslogtreecommitdiffstats
path: root/code/server
diff options
context:
space:
mode:
authorthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-08-26 12:43:38 +0000
committerthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-08-26 12:43:38 +0000
commit8a62e0ab89412c45f2590083da63ceb0d0c62d7c (patch)
tree350e563f6b5be46f4c8eff032df371f1c3bceee3 /code/server
parent48491a8f4c5132ca563d988552965a6dfc3cae4a (diff)
downloadioquake3-aero-8a62e0ab89412c45f2590083da63ceb0d0c62d7c.tar.gz
ioquake3-aero-8a62e0ab89412c45f2590083da63ceb0d0c62d7c.zip
Correctly handle 0 timescale
git-svn-id: svn://svn.icculus.org/quake3/trunk@873 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/server')
-rw-r--r--code/server/sv_main.c7
1 files changed, 7 insertions, 0 deletions
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;