From: terencehill Date: Mon, 15 Jul 2019 21:50:37 +0000 (+0200) Subject: Improve crouch check. Fix compilation units X-Git-Tag: xonotic-v0.8.5~1356^2~24 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5f74945633ea00257840db736dbd1413330026be;p=xonotic%2Fxonotic-data.pk3dir.git Improve crouch check. Fix compilation units --- 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)