]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Block the bots during the countdown to game start in general warmup mode (with g_warm...
authorterencehill <piuntn@gmail.com>
Thu, 23 Sep 2010 18:06:13 +0000 (20:06 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 23 Sep 2010 18:06:13 +0000 (20:06 +0200)
Keep doing the last movement until the game starts as they do currently (for example keep running against a wall) just sucks.

qcsrc/server/bot/bot.qc

index a629b95a13bdbd7fc5713ca01dfa5a1247dcf88d..945600a886b208e6af45bb58aba71cd5d304a4ce 100644 (file)
@@ -43,7 +43,7 @@ void bot_think()
        //self.bot_painintensity = self.bot_painintensity + self.bot_oldhealth - self.health;
        //self.bot_painintensity = bound(0, self.bot_painintensity, 100);
 
-       if(time < game_starttime || ((cvar("g_campaign") && !campaign_bots_may_start)))
+       if (cvar("g_campaign") && !campaign_bots_may_start)
        {
                self.nextthink = time + 0.5;
                return;
@@ -81,6 +81,14 @@ void bot_think()
        self.BUTTON_CHAT = 0;
        self.BUTTON_USE = 0;
 
+       if (time < game_starttime)
+       {
+               // block the bot during the countdown to game start
+               self.movement = '0 0 0';
+               self.nextthink = game_starttime;
+               return;
+       }
+
        // if dead, just wait until we can respawn
        if (self.deadflag)
        {