]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/default/bot.qc
Merge branch 'bones_was_here/warmup' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / default / bot.qc
index b81507890f302da772d225f28f44c12a73ac85ae..5bfa79aa55edbb3ace3986e6fe60c8721d259329 100644 (file)
@@ -30,6 +30,7 @@
 #include <server/weapons/accuracy.qh>
 #include <server/weapons/selection.qh>
 #include <server/world.qh>
+#include <server/command/vote.qh>
 
 STATIC_INIT(bot) { bot_calculate_stepheightvec(); }
 
@@ -118,7 +119,6 @@ void bot_think(entity this)
                        W_NextWeapon(this, 0, weaponentity);
                // block the bot during the countdown to game start
                CS(this).movement = '0 0 0';
-               this.bot_nextthink = game_starttime;
                return;
        }
 
@@ -146,6 +146,12 @@ void bot_think(entity this)
        else if(this.aistatus & AI_STATUS_STUCK)
                navigation_unstuck(this);
 
+       if (warmup_stage && !this.ready)
+       {
+               this.ready = true;
+               ReadyCount(); // this must be delayed until the bot has spawned
+       }
+
        // now call the current bot AI (havocbot for example)
        this.bot_ai(this);
 }