From: terencehill Date: Tue, 22 May 2018 17:57:50 +0000 (+0200) Subject: Bot AI: also try to make a medium jump in real-time; it fixes bots getting stuck... X-Git-Tag: xonotic-v0.8.5~1923^2~50 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=875ad018f60a7490920410c7905b8bd64030f80b;p=xonotic%2Fxonotic-data.pk3dir.git Bot AI: also try to make a medium jump in real-time; it fixes bots getting stuck in front of small tunnels that require a jump to enter (e.g. the hole in the wall in Finalrage) --- diff --git a/qcsrc/server/bot/default/havocbot/havocbot.qc b/qcsrc/server/bot/default/havocbot/havocbot.qc index 9c3ac1cd3..a0b1e398d 100644 --- a/qcsrc/server/bot/default/havocbot/havocbot.qc +++ b/qcsrc/server/bot/default/havocbot/havocbot.qc @@ -986,6 +986,13 @@ void havocbot_movetogoal(entity this) tracebox(this.origin + jump_height, this.mins, this.maxs, actual_destorg + jump_height, false, this); if (trace_fraction > s) PHYS_INPUT_BUTTON_JUMP(this) = true; + else + { + jump_height = stepheightvec + jumpheight_vec / 2; + tracebox(this.origin + jump_height, this.mins, this.maxs, actual_destorg + jump_height, false, this); + if (trace_fraction > s) + PHYS_INPUT_BUTTON_JUMP(this) = true; + } } }