X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=host.c;h=7e7bc56a7f2950de8df0e6c6a9ffa52273338326;hp=a54067af5250d3d20aaba69fe285f418f5a3e019;hb=8ab339588b127e88e27bfa08f6eccbf9400b51f9;hpb=221a6cb74c3a3b30b9e60247d6e42d7a6fcdebf0 diff --git a/host.c b/host.c index a54067af..7e7bc56a 100644 --- 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;