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 ed9070f..fb6f1e0 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;