/*
Copyright (C) 1996-1997 Id Software, Inc.
+Copyright (C) 2000-2021 DarkPlaces contributors
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
*/
-host_t host;
+host_static_t host;
// pretend frames take this amount of time (in seconds), 0 = realtime
cvar_t host_framerate = {CF_CLIENT | CF_SERVER, "host_framerate","0", "locks frame timing to this value in seconds, 0.05 is 20fps for example, note that this can easily run too fast, use cl_maxfps if you want to limit your framerate instead, or sys_ticrate to limit server speed"};
if (cls.state == ca_dedicated)
Sys_Error ("Host_Error: %s",hosterrorstring2); // dedicated servers exit
- CL_Disconnect ();
+ CL_Disconnect();
cls.demonum = -1;
hosterror = false;
// TODO can we do the same for ServerFrame? Probably not.
}
else
+ {
+ if (cls.state != ca_dedicated)
+ Curl_Select(&time);
Sys_Sleep((int)time);
+ }
delta = Sys_DirtyTime() - time0;
- if (delta < 0 || delta >= 1800)
+ if (delta < 0 || delta >= 1800)
delta = 0;
host.sleeptime += delta;
// R_TimeReport("sleep");