From: terencehill Date: Wed, 14 Nov 2018 17:53:35 +0000 (+0100) Subject: Bot AI: slightly improve ladder climbing X-Git-Tag: xonotic-v0.8.5~1705^2~13 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1a0eca84acc90389280d0b5b8563d179211a8ca7;p=xonotic%2Fxonotic-data.pk3dir.git Bot AI: slightly improve ladder climbing --- diff --git a/qcsrc/server/bot/default/havocbot/havocbot.qc b/qcsrc/server/bot/default/havocbot/havocbot.qc index 94499c2eb..0ebf5ac50 100644 --- a/qcsrc/server/bot/default/havocbot/havocbot.qc +++ b/qcsrc/server/bot/default/havocbot/havocbot.qc @@ -1175,13 +1175,11 @@ void havocbot_movetogoal(entity this) } if (ladder_zdir) { - if (vdist(flatdir, <, 15)) - dir = ladder_zdir * '0 0 1'; + if (vdist(vec2(diff), <, 40)) + dir.z = ladder_zdir * 4; else - { - dir.z = ladder_zdir * 1.3; - dir = normalize(dir); - } + dir.z = ladder_zdir * 2; + dir = normalize(dir); } } @@ -1195,6 +1193,7 @@ void havocbot_movetogoal(entity this) dir = normalize(dir); } + // already executed when bot targets an enemy if (!this.bot_aimdir_executed) { if (time < this.bot_stop_moving_timeout)