]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
Rework R_CanSeeBox a bit to support an eyejitter feature, and make it available throu...
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index a54067af5250d3d20aaba69fe285f418f5a3e019..7e7bc56a7f2950de8df0e6c6a9ffa52273338326 100644 (file)
--- a/host.c
+++ b/host.c
@@ -212,7 +212,7 @@ static void Host_ServerOptions (void)
                else
                {
                        // default players in some games, singleplayer in most
-                       if (gamemode != GAME_GOODVSBAD2 && gamemode != GAME_NEXUIZ && gamemode != GAME_XONOTIC && gamemode != GAME_BATTLEMECH)
+                       if (gamemode != GAME_GOODVSBAD2 && !IS_NEXUIZ_DERIVED(gamemode) && gamemode != GAME_BATTLEMECH)
                                svs.maxclients = 1;
                }
        }
@@ -679,6 +679,7 @@ void Host_Main(void)
        Host_Init();
 
        realtime = 0;
+       host_dirtytime = Sys_DirtyTime();
        for (;;)
        {
                if (setjmp(host_abortframe))
@@ -803,8 +804,12 @@ void Host_Main(void)
                                wait = 1; // because we cast to int
 
                        time0 = Sys_DirtyTime();
-                       if (sv_checkforpacketsduringsleep.integer && !sys_usenoclockbutbenchmark.integer && !svs.threaded)
+                       if (sv_checkforpacketsduringsleep.integer && !sys_usenoclockbutbenchmark.integer && !svs.threaded) {
                                NetConn_SleepMicroseconds((int)wait);
+                               if (cls.state != ca_dedicated)
+                                       NetConn_ClientFrame(); // helps server browser get good ping values
+                               // TODO can we do the same for ServerFrame? Probably not.
+                       }
                        else
                                Sys_Sleep((int)wait);
                        delta = Sys_DirtyTime() - time0;