From: terencehill Date: Sun, 8 Jan 2012 21:14:11 +0000 (+0100) Subject: First round in CA: detect when the first player joins the game and try to start the... X-Git-Tag: xonotic-v0.6.0~42^2~7^2~10 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d55cbbe6136702ed184ae1a7bf099e2b28130220;p=xonotic%2Fxonotic-data.pk3dir.git First round in CA: detect when the first player joins the game and try to start the countdown. It fixes bots never joining the game if added right at map start (bot_number already set when starting the server). --- diff --git a/qcsrc/server/arena.qc b/qcsrc/server/arena.qc index f66ddb2cef..31698e9229 100644 --- a/qcsrc/server/arena.qc +++ b/qcsrc/server/arena.qc @@ -210,10 +210,10 @@ void Arena_Warmup() f = ceil(warmup - time); - allowed_to_spawn = 0; - if(inWarmupStage) allowed_to_spawn = 1; + else if(!g_ca) + allowed_to_spawn = 0; if(time < warmup && !inWarmupStage) { @@ -379,6 +379,12 @@ void count_alive_players() */ void Spawnqueue_Check() { + if(warmup == 0 && g_ca) + { + if(red_players || blue_players) + reset_map(TRUE); + return; + } if(time < warmup + 1 || inWarmupStage || intermission_running) return;