* run the frame. Everything that happens before this
* point will happen even if we're sleeping this frame.
*/
- if((cl_timer += time) < 0)
- return cl_timer;
// limit the frametime steps to no more than 100ms each
- if (cl_timer > 0.1)
- cl_timer = 0.1;
+ cl_timer = min(cl_timer + time, 0.1);
// Run at full speed when querying servers, compared to waking up early to parse
// this is simpler and gives pings more representative of what can be expected when playing.
maxfps = (vid_activewindow || serverlist_querystage ? cl_maxfps : cl_maxidlefps).value;
- if (cls.state != ca_dedicated && (cl_timer > 0 || cls.timedemo || maxfps <= 0))
+ if (cls.state != ca_dedicated && (cl_timer > 0 || host.restless || maxfps <= 0))
{
R_TimeReport("---");
Collision_Cache_NewFrame();
clframetime = 0;
}
- if (cls.timedemo)
- clframetime = cl.realframetime = cl_timer;
-
// deduct the frame time from the accumulator
cl_timer -= cl.realframetime;
dpsnprintf(cls.capturevideo.basename, sizeof(cls.capturevideo.basename), "video/%s%03i", timestring, cl_capturevideo_number.integer);
Cvar_SetValueQuick(&cl_capturevideo_number, cl_capturevideo_number.integer + 1);
+ // capture demos as fast as possible
+ host.restless = !cls.capturevideo.realtime;
+
/*
for (i = 0;i < 256;i++)
{
if (!cls.capturevideo.active)
return;
cls.capturevideo.active = false;
+ host.restless = false;
Con_Printf("Finishing capture of %s.%s (%d frames, %d audio frames)\n", cls.capturevideo.basename, cls.capturevideo.formatextension, cls.capturevideo.frame, cls.capturevideo.soundsampleframe);