From 3f0df7fbab9766c59163b232455f6b2c0d2e4f73 Mon Sep 17 00:00:00 2001 From: mand1nga Date: Sun, 23 Aug 2009 21:24:54 +0000 Subject: [PATCH] Enable code for jetpack navigation, although the feature isn't available by default git-svn-id: svn://svn.icculus.org/nexuiz/trunk@7509 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/server/bots.qc | 9 --------- data/qcsrc/server/havocbot.qc | 2 -- 2 files changed, 11 deletions(-) diff --git a/data/qcsrc/server/bots.qc b/data/qcsrc/server/bots.qc index 8d4f87b86..78fa61549 100644 --- a/data/qcsrc/server/bots.qc +++ b/data/qcsrc/server/bots.qc @@ -8,10 +8,8 @@ float AI_STATUS_OUT_WATER = 32; // Trying to get out of water float AI_STATUS_WAYPOINT_PERSONAL_LINKING = 64; // Waiting for the personal waypoint to be linked float AI_STATUS_WAYPOINT_PERSONAL_GOING = 128; // Going to a personal waypoint float AI_STATUS_WAYPOINT_PERSONAL_REACHED = 256; // Personal waypoint reached -#ifdef BOT_JETPACK_NAVIGATION float AI_STATUS_JETPACK_FLYING = 512; float AI_STATUS_JETPACK_LANDING = 1024; -#endif // utilities for path debugging #ifdef DEBUG_TRACEWALK @@ -1749,11 +1747,9 @@ entity navigation_get_bestgoal() return ent; } -#ifdef BOT_JETPACK_NAVIGATION // fields required for jetpack navigation .entity navigation_jetpack_goal; .vector navigation_jetpack_point; -#endif // updates the best goal according to a weighted calculation of travel cost and item value of a new proposed item .void() havocbot_role; @@ -1763,7 +1759,6 @@ void navigation_routerating(entity e, float f, float rangebias) if (!e) return; -#ifdef BOT_JETPACK_NAVIGATION // Evaluate path using jetpack if(g_jetpack) if(self.items & IT_JETPACK) @@ -1903,11 +1898,9 @@ float navigation_routetogoal(entity e, vector startposition) // put the entity on the goal stack navigation_pushroute(e); -#ifdef BOT_JETPACK_NAVIGATION if(g_jetpack) if(e==self.navigation_jetpack_goal) return TRUE; -#endif // if it can reach the goal there is nothing more to do if (tracewalk(self, startposition, PL_MIN, PL_MAX, e.origin, bot_navigation_movemode)) @@ -2022,9 +2015,7 @@ void navigation_poptouchedgoals() // begin a goal selection session (queries spawnfunc_waypoint network) void navigation_goalrating_start() { -#ifdef BOT_JETPACK_NAVIGATION self.navigation_jetpack_goal = world; -#endif navigation_bestrating = -1; self.navigation_hasgoals = FALSE; navigation_bestgoals_reset(); diff --git a/data/qcsrc/server/havocbot.qc b/data/qcsrc/server/havocbot.qc index 6d9f2294b..0b7a9ce35 100644 --- a/data/qcsrc/server/havocbot.qc +++ b/data/qcsrc/server/havocbot.qc @@ -308,7 +308,6 @@ void havocbot_movetogoal() self.movement = '0 0 0'; maxspeed = cvar("sv_maxspeed"); -#ifdef BOT_JETPACK_NAVIGATION // Jetpack navigation if(self.navigation_jetpack_goal) if(self.goalcurrent==self.navigation_jetpack_goal) @@ -375,7 +374,6 @@ void havocbot_movetogoal() } return; } -#endif // Handling of jump pads if(self.jumppadcount) -- 2.39.2