Correctly handle 0 timescale

This commit is contained in:
Thilo Schulz 2006-08-26 12:43:38 +00:00
parent 1f8c2c56eb
commit bea6fcff13

View file

@ -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;