-
-/// incremented every frame, never reset
-extern int host_framecount;
-/// not bounded in any way, changed at start of every frame, never reset
-extern double realtime;
-/// equal to Sys_DirtyTime() at the start of this host frame
-extern double host_dirtytime;
+typedef enum host_state_e
+{
+ host_shutdown,
+ host_init,
+ host_loading,
+ host_active
+} host_state_t;
+
+typedef struct host_s
+{
+ jmp_buf abortframe;
+ int state;
+ 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
+ double sleeptime; // time spent sleeping overall
+ qbool restless; // don't sleep
+ qbool paused; // global paused state, pauses both client and server
+ cmd_buf_t *cbuf;
+
+ struct
+ {
+ void (*ConnectLocal)(void);
+ } hook;
+} host_t;
+
+extern host_t host;
+extern cvar_t host_isclient;