X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=host.c;h=0bafb91ad6076e4d898bd50d1966b92d399afdd5;hb=f7c3669f2d20d7d0951803f40343d75c3f36bc18;hp=3d8c3dce16518a10a0c1e98fdb0f09454a79fce0;hpb=82d0052f6cddbf9ac56bffb3528614dd26739b7d;p=xonotic%2Fdarkplaces.git diff --git a/host.c b/host.c index 3d8c3dce..0bafb91a 100644 --- a/host.c +++ b/host.c @@ -67,7 +67,6 @@ cvar_t cl_minfps_qualitypower = {CVAR_SAVE, "cl_minfps_qualitypower", "4", "rais cvar_t cl_minfps_qualityscale = {CVAR_SAVE, "cl_minfps_qualityscale", "0.5", "multiplier for quality"}; cvar_t cl_maxfps = {CVAR_SAVE, "cl_maxfps", "1000000", "maximum fps cap, if game is running faster than this it will wait before running another frame (useful to make cpu time available to other programs)"}; cvar_t cl_maxidlefps = {CVAR_SAVE, "cl_maxidlefps", "20", "maximum fps cap when the game is not the active window (makes cpu time available to other programs"}; -cvar_t cl_alwayssleep = {CVAR_SAVE, "cl_alwayssleep", "0", "calls operating system Sleep function at the end of each frame with 0 milliseconds, even if not hitting framerate cap - can make gameplay smoother"}; cvar_t developer = {0, "developer","0", "prints additional debugging messages and information (recommended for modders and level designers)"}; cvar_t developer_loadfile = {0, "developer_loadfile","0", "prints name and size of every file loaded via the FS_LoadFile function (which is almost everything)"}; @@ -218,7 +217,6 @@ static void Host_InitLocal (void) Cvar_RegisterVariable (&cl_minfps_qualityscale); Cvar_RegisterVariable (&cl_maxfps); Cvar_RegisterVariable (&cl_maxidlefps); - Cvar_RegisterVariable (&cl_alwayssleep); Cvar_RegisterVariable (&developer); Cvar_RegisterVariable (&developer_loadfile); @@ -530,9 +528,6 @@ void Host_ShutdownServer(void) // make sure all the clients know we're disconnecting SV_VM_Begin(); - for (i = 0, host_client = svs.clients;i < svs.maxclients;i++, host_client++) - if (host_client->active) - SV_DropClient(false); // server shutdown if(prog->loaded) if(prog->funcoffsets.SV_Shutdown) { @@ -540,6 +535,9 @@ void Host_ShutdownServer(void) prog->funcoffsets.SV_Shutdown = 0; // prevent it from getting called again PRVM_ExecuteProgram(s,"SV_Shutdown() required"); } + for (i = 0, host_client = svs.clients;i < svs.maxclients;i++, host_client++) + if (host_client->active) + SV_DropClient(false); // server shutdown SV_VM_End(); NetConn_CloseServerPorts(); @@ -699,7 +697,7 @@ void Host_Main(void) wait = max(cl_timer, sv_timer) * -1000000.0; wait = bound(0, wait, 100000); - if (!cls.timedemo && wait > 0) + if (!cls.timedemo && wait >= 1) { double time0 = Sys_DoubleTime(); if (sv_checkforpacketsduringsleep.integer) @@ -913,9 +911,6 @@ void Host_Main(void) } host_framecount++; - - if (cl_alwayssleep.integer) - Sys_Sleep(0); } }