This is meant to reduce client code in the common Host_Main.
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12798
d7cf8633-e32d-0410-b094-
e92efae38249
static int benchmark_runs = 0;
char vabuf[1024];
- cls.timedemo = false;
+ cls.timedemo = host.restless = false;
frames = cls.td_frames;
time = host.realtime - cls.td_starttime;
key_consoleactive = 0;
scr_con_current = 0;
- cls.timedemo = true;
+ cls.timedemo = host.restless = true;
cls.td_frames = -2; // skip the first frame
cls.demonum = -1; // stop demo loop
}
cls.state = ca_disconnected;
cl.islocalgame = false;
- cls.demoplayback = cls.timedemo = false;
+ cls.demoplayback = cls.timedemo = host.restless = false;
cls.signon = 0;
// If we're dropped mid-connection attempt, it won't clear otherwise.
char vabuf[1024];
qboolean playing;
+ host.restless = false;
+
Host_Init();
host.realtime = 0;
else
wait = max(cl_timer, sv_timer) * -1000000.0;
- if (!cls.timedemo && wait >= 1)
+ if (!host.restless && wait >= 1)
{
double time0, delta;
int framecount; // incremented every frame, never reset (checked by Host_Error and Host_SaveConfig_f)
double realtime; // the accumulated mainloop time since application started (with filtering), without any slowmo or clamping
double dirtytime; // the main loop wall time for this frame, equal to Sys_DirtyTime() at the start of this host frame
+ qboolean restless; // don't sleep
} host_t;
extern host_t host;