From 5f74945633ea00257840db736dbd1413330026be Mon Sep 17 00:00:00 2001 From: terencehill Date: Mon, 15 Jul 2019 23:50:37 +0200 Subject: [PATCH] Improve crouch check. Fix compilation units --- qcsrc/server/bot/api.qh | 2 ++ qcsrc/server/bot/default/havocbot/havocbot.qc | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/qcsrc/server/bot/api.qh b/qcsrc/server/bot/api.qh index 75062e6ace..7c7608a54e 100644 --- a/qcsrc/server/bot/api.qh +++ b/qcsrc/server/bot/api.qh @@ -103,6 +103,7 @@ void navigation_goalrating_timeout_set(entity this); void navigation_goalrating_timeout_force(entity this); void navigation_goalrating_timeout_expire(entity this, float seconds); bool navigation_goalrating_timeout(entity this); +void navigation_goalrating_timeout_extend_if_needed(entity this, float seconds); bool navigation_goalrating_timeout_can_be_anticipated(entity this); void navigation_markroutes(entity this, entity fixed_source_waypoint); void navigation_markroutes_inverted(entity fixed_source_waypoint); @@ -126,6 +127,7 @@ void waypoint_spawnforteleporter_wz(entity e, entity tracetest_ent); void waypoint_spawn_fromeditor(entity pl, bool at_crosshair, bool is_jump_wp, bool is_crouch_wp); entity waypoint_spawn(vector m1, vector m2, float f); void waypoint_unreachable(entity pl); +void waypoint_start_hardwiredlink(entity pl); void waypoint_getSymmetricalOrigin_cmd(entity caller, bool save, int arg_idx); void waypoint_getSymmetricalAxis_cmd(entity caller, bool save, int arg_idx); diff --git a/qcsrc/server/bot/default/havocbot/havocbot.qc b/qcsrc/server/bot/default/havocbot/havocbot.qc index 700ef1eeb6..17ec0c6fe0 100644 --- a/qcsrc/server/bot/default/havocbot/havocbot.qc +++ b/qcsrc/server/bot/default/havocbot/havocbot.qc @@ -288,7 +288,7 @@ void havocbot_bunnyhop(entity this, vector dir) return; } - if(this.waterlevel > WATERLEVEL_WETFEET || this.maxs.z == PL_CROUCH_MAX_CONST.z) + if(this.waterlevel > WATERLEVEL_WETFEET || IS_DUCKED(this)) { this.aistatus &= ~AI_STATUS_RUNNING; return; @@ -1063,7 +1063,7 @@ void havocbot_movetogoal(entity this) bool jump_forbidden = false; if (!turning && fabs(deviation.y) > 50) jump_forbidden = true; - else if (this.maxs.z == PL_CROUCH_MAX_CONST.z) + else if (IS_DUCKED(this)) { tracebox(this.origin, PL_MIN_CONST, PL_MAX_CONST, this.origin, false, this); if (trace_startsolid) -- 2.39.2