From: terencehill Date: Mon, 6 Feb 2017 13:16:51 +0000 (+0100) Subject: Fix drunk-like behaviour of certain bots when skill is set to a high value by reducin... X-Git-Tag: xonotic-v0.8.2~202^2~18 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f9a2903759f520c9fca1a7ca9109860c68b6878d;p=xonotic%2Fxonotic-data.pk3dir.git Fix drunk-like behaviour of certain bots when skill is set to a high value by reducing AI think interval depending on bot skill --- diff --git a/qcsrc/server/bot/default/bot.qc b/qcsrc/server/bot/default/bot.qc index 2fb0a43c2..16a082b9f 100644 --- a/qcsrc/server/bot/default/bot.qc +++ b/qcsrc/server/bot/default/bot.qc @@ -64,9 +64,8 @@ void bot_think(entity this) if(autocvar_bot_god) 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); + this.bot_nextthink = max(time, this.bot_nextthink) + max(0.01, autocvar_bot_ai_thinkinterval * pow(0.5, this.bot_aiskill) * min(14 / (skill + 14), 1)); + //if (this.bot_painintensity > 0) // this.bot_painintensity = this.bot_painintensity - (skill + 1) * 40 * frametime;