From: mand1nga Date: Tue, 23 Aug 2011 22:05:31 +0000 (-0300) Subject: Mark hardwired links as trusted. No checks for dangers will be performed while walkin... X-Git-Tag: xonotic-v0.5.0~36^2~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ec91228cac555cbb6553a3aa56fb259e421f7269;p=xonotic%2Fxonotic-data.pk3dir.git Mark hardwired links as trusted. No checks for dangers will be performed while walking that part of the route --- 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;