]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
First round in CA: detect when the first player joins the game and try to start the...
authorterencehill <piuntn@gmail.com>
Sun, 8 Jan 2012 21:14:11 +0000 (22:14 +0100)
committerterencehill <piuntn@gmail.com>
Sun, 8 Jan 2012 21:14:11 +0000 (22:14 +0100)
It fixes bots never joining the game if added right at map start (bot_number already set when starting the server).

qcsrc/server/arena.qc

index f66ddb2cef7f4a791a646d8fd489224f1d5cde57..31698e92294590fd90c58605ab052c44e777c561 100644 (file)
@@ -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;