From: terencehill Date: Tue, 25 Dec 2018 18:36:28 +0000 (+0100) Subject: Bot AI: fix low skilled bots deviating too much from waypoint path due to movement... X-Git-Tag: xonotic-v0.8.5~1586^2~5 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=75c1433de7d802bbb9a1212e30cd70596dac0aee;p=xonotic%2Fxonotic-data.pk3dir.git Bot AI: fix low skilled bots deviating too much from waypoint path due to movement being dependent from aim (even though it could be considered a feature). This commit actually reverts 40b2ec25 --- diff --git a/qcsrc/server/bot/default/havocbot/havocbot.qc b/qcsrc/server/bot/default/havocbot/havocbot.qc index d2bb62ca3..bc396fd72 100644 --- a/qcsrc/server/bot/default/havocbot/havocbot.qc +++ b/qcsrc/server/bot/default/havocbot/havocbot.qc @@ -255,12 +255,12 @@ void havocbot_keyboard_movement(entity this, vector destorg) this.havocbot_keyboard = keyboard * autocvar_sv_maxspeed; if (this.havocbot_ducktime > time) PHYS_INPUT_BUTTON_CROUCH(this) = true; - } - keyboard = this.havocbot_keyboard; - float blend = bound(0, vlen(destorg - this.origin) / autocvar_bot_ai_keyboard_distance, 1); // When getting close move with 360 degree - //dprint("movement ", vtos(CS(this).movement), " keyboard ", vtos(keyboard), " blend ", ftos(blend), "\n"); - CS(this).movement = CS(this).movement + (keyboard - CS(this).movement) * blend; + keyboard = this.havocbot_keyboard; + float blend = bound(0, vlen(destorg - this.origin) / autocvar_bot_ai_keyboard_distance, 1); // When getting close move with 360 degree + //dprint("movement ", vtos(CS(this).movement), " keyboard ", vtos(keyboard), " blend ", ftos(blend), "\n"); + CS(this).movement = CS(this).movement + (keyboard - CS(this).movement) * blend; + } } void havocbot_bunnyhop(entity this, vector dir)