]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix bots thinking too much after setting a high enough slowmo value
authorterencehill <piuntn@gmail.com>
Sun, 25 Dec 2016 10:55:57 +0000 (11:55 +0100)
committerterencehill <piuntn@gmail.com>
Sun, 25 Dec 2016 10:55:57 +0000 (11:55 +0100)
qcsrc/server/bot/default/bot.qc

index ed9070f9cdd60821538da821afdceab6a2405cab..fb6f1e046d9da192218b8d78da18474b87de4b67 100644 (file)
@@ -64,6 +64,8 @@ void bot_think(entity this)
                this.flags |= FL_GODMODE;
 
        this.bot_nextthink = this.bot_nextthink + autocvar_bot_ai_thinkinterval * pow(0.5, this.bot_aiskill);
+       if(this.bot_nextthink < time)
+               this.bot_nextthink = time + autocvar_bot_ai_thinkinterval * pow(0.5, this.bot_aiskill);
        //if (this.bot_painintensity > 0)
        //      this.bot_painintensity = this.bot_painintensity - (skill + 1) * 40 * frametime;