From 875ad018f60a7490920410c7905b8bd64030f80b Mon Sep 17 00:00:00 2001 From: terencehill Date: Tue, 22 May 2018 19:57:50 +0200 Subject: [PATCH] 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) --- qcsrc/server/bot/default/havocbot/havocbot.qc | 7 +++++++ 1 file changed, 7 insertions(+) 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; + } } } -- 2.39.2