sys_frametime: if it turns out to be invalid (<= 0), fall back to 60Hz (as sys_ticrat...
authorRudolf Polzer <divVerent@xonotic.org>
Wed, 17 Nov 2010 10:59:38 +0000 (11:59 +0100)
committerRudolf Polzer <divVerent@xonotic.org>
Wed, 17 Nov 2010 10:59:38 +0000 (11:59 +0100)
qcsrc/server/sv_main.qc

index 5b8ca7f..8a73e67 100644 (file)
@@ -199,6 +199,8 @@ void StartFrame (void)
        sv_airspeedlimit_nonqw = cvar("sv_airspeedlimit_nonqw");
        teamplay = cvar ("teamplay");
        sys_frametime = cvar("sys_ticrate") * cvar("slowmo");
+       if(sys_frametime <= 0)
+               sys_frametime = 1.0 / 60.0; // somewhat safe fallback
        sv_doublejump = cvar("sv_doublejump");
 
        if (timeoutStatus == 1) // just before the timeout (when timeoutStatus will be 2)