]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/default/bot.qc
Give bots genuine ready status, fixes not appearing ready until a human is ready
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / default / bot.qc
index d7cf429d74e150a8324c0c30bfe0245d683658f1..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(); }
 
@@ -145,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);
 }