From 7ca1d66af4b7d36f2e036100ba6183fff7213829 Mon Sep 17 00:00:00 2001 From: terencehill Date: Wed, 8 Feb 2017 14:18:54 +0100 Subject: [PATCH] Stop bunnyhoping when bot slows down for some reason --- qcsrc/server/bot/default/havocbot/havocbot.qc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qcsrc/server/bot/default/havocbot/havocbot.qc b/qcsrc/server/bot/default/havocbot/havocbot.qc index 13b8739d7..fad7dbda7 100644 --- a/qcsrc/server/bot/default/havocbot/havocbot.qc +++ b/qcsrc/server/bot/default/havocbot/havocbot.qc @@ -290,7 +290,8 @@ void havocbot_bunnyhop(entity this, vector dir) maxspeed = autocvar_sv_maxspeed; - if(this.aistatus & AI_STATUS_DANGER_AHEAD) + if(this.aistatus & AI_STATUS_RUNNING && vdist(this.velocity, <, autocvar_sv_maxspeed * 0.75) + || this.aistatus & AI_STATUS_DANGER_AHEAD) { this.aistatus &= ~AI_STATUS_RUNNING; PHYS_INPUT_BUTTON_JUMP(this) = false; -- 2.39.2