From ec91228cac555cbb6553a3aa56fb259e421f7269 Mon Sep 17 00:00:00 2001 From: mand1nga Date: Tue, 23 Aug 2011 19:05:31 -0300 Subject: [PATCH] Mark hardwired links as trusted. No checks for dangers will be performed while walking that part of the route --- qcsrc/server/bot/havocbot/havocbot.qc | 2 +- qcsrc/server/bot/waypoints.qc | 2 ++ qcsrc/server/bot/waypoints.qh | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/qcsrc/server/bot/havocbot/havocbot.qc b/qcsrc/server/bot/havocbot/havocbot.qc index bc0220b19..bbdb16cd2 100644 --- a/qcsrc/server/bot/havocbot/havocbot.qc +++ b/qcsrc/server/bot/havocbot/havocbot.qc @@ -763,7 +763,7 @@ void havocbot_movetogoal() // (only when the bot is on the ground or jumping intentionally) self.aistatus &~= AI_STATUS_DANGER_AHEAD; - if(trace_fraction == 1 && self.jumppadcount == 0) + if(trace_fraction == 1 && self.jumppadcount == 0 && !self.goalcurrent.wphardwired ) if(self.flags & FL_ONGROUND || self.aistatus & AI_STATUS_RUNNING || self.BUTTON_JUMP == TRUE) { // Look downwards diff --git a/qcsrc/server/bot/waypoints.qc b/qcsrc/server/bot/waypoints.qc index 8aea49be5..076e96968 100644 --- a/qcsrc/server/bot/waypoints.qc +++ b/qcsrc/server/bot/waypoints.qc @@ -539,6 +539,8 @@ void waypoint_load_links_hardwired() ++c; waypoint_addlink(wp_from, wp_to); + wp_from.wphardwired = TRUE; + wp_to.wphardwired = TRUE; } fclose(file); diff --git a/qcsrc/server/bot/waypoints.qh b/qcsrc/server/bot/waypoints.qh index 9c84de84b..1bb800fd0 100644 --- a/qcsrc/server/bot/waypoints.qh +++ b/qcsrc/server/bot/waypoints.qh @@ -24,7 +24,7 @@ float botframe_cachedwaypointlinks; .float wp16mincost, wp17mincost, wp18mincost, wp19mincost, wp20mincost, wp21mincost, wp22mincost, wp23mincost; .float wp24mincost, wp25mincost, wp26mincost, wp27mincost, wp28mincost, wp29mincost, wp30mincost, wp31mincost; -.float wpfire, wpcost, wpconsidered, wpisbox, wpflags, wplinked; +.float wpfire, wpcost, wpconsidered, wpisbox, wpflags, wplinked, wphardwired; .vector wpnearestpoint; -- 2.39.2