From: terencehill Date: Wed, 21 Nov 2018 12:30:31 +0000 (+0100) Subject: Bot AI: slightly improve underwater movement X-Git-Tag: xonotic-v0.8.5~1705^2~12 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7f999efea3192f8d3e8d2c5ab6d79bd731487965;p=xonotic%2Fxonotic-data.pk3dir.git Bot AI: slightly improve underwater movement --- diff --git a/qcsrc/server/bot/default/havocbot/havocbot.qc b/qcsrc/server/bot/default/havocbot/havocbot.qc index 0ebf5ac50..35b2cc4e2 100644 --- a/qcsrc/server/bot/default/havocbot/havocbot.qc +++ b/qcsrc/server/bot/default/havocbot/havocbot.qc @@ -929,12 +929,18 @@ void havocbot_movetogoal(entity this) } else { - dir = flatdir; if(this.velocity.z >= 0 && !(this.watertype == CONTENT_WATER && destorg.z < this.origin.z) && (this.aistatus & AI_STATUS_OUT_WATER)) + { PHYS_INPUT_BUTTON_JUMP(this) = true; + dir = flatdir; + } else + { PHYS_INPUT_BUTTON_JUMP(this) = false; + if (destorg.z > this.origin.z) + dir = flatdir; + } } } else