]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Improve crouch check. Fix compilation units
authorterencehill <piuntn@gmail.com>
Mon, 15 Jul 2019 21:50:37 +0000 (23:50 +0200)
committerterencehill <piuntn@gmail.com>
Mon, 15 Jul 2019 21:50:37 +0000 (23:50 +0200)
qcsrc/server/bot/api.qh
qcsrc/server/bot/default/havocbot/havocbot.qc

index 75062e6aceba782a907726d849f076793aad4f8a..7c7608a54ea01d866bbea2885b0dcbc341b4bc6e 100644 (file)
@@ -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);
index 700ef1eeb6ca23ba4b170b353eeb795481c9ec2d..17ec0c6fe02ef27651f97b7d68dc42a2fa06fa24 100644 (file)
@@ -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)