From: terencehill Date: Wed, 8 Feb 2017 13:18:54 +0000 (+0100) Subject: Stop bunnyhoping when bot slows down for some reason X-Git-Tag: xonotic-v0.8.2~202^2~16 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7ca1d66af4b7d36f2e036100ba6183fff7213829;p=xonotic%2Fxonotic-data.pk3dir.git Stop bunnyhoping when bot slows down for some reason --- 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;