[nexuiz-commits] r7509 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Aug 23 17:24:54 EDT 2009


Author: mand1nga
Date: 2009-08-23 17:24:54 -0400 (Sun, 23 Aug 2009)
New Revision: 7509

Modified:
   trunk/data/qcsrc/server/bots.qc
   trunk/data/qcsrc/server/havocbot.qc
Log:
Enable code for jetpack navigation, although the feature isn't available by default

Modified: trunk/data/qcsrc/server/bots.qc
===================================================================
--- trunk/data/qcsrc/server/bots.qc	2009-08-23 20:23:48 UTC (rev 7508)
+++ trunk/data/qcsrc/server/bots.qc	2009-08-23 21:24:54 UTC (rev 7509)
@@ -8,10 +8,8 @@
 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 @@
 	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 @@
 	if (!e)
 		return;
 
-#ifdef BOT_JETPACK_NAVIGATION
 	// Evaluate path using jetpack
 	if(g_jetpack)
 	if(self.items & IT_JETPACK)
@@ -1903,11 +1898,9 @@
 	// 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 @@
 // 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();

Modified: trunk/data/qcsrc/server/havocbot.qc
===================================================================
--- trunk/data/qcsrc/server/havocbot.qc	2009-08-23 20:23:48 UTC (rev 7508)
+++ trunk/data/qcsrc/server/havocbot.qc	2009-08-23 21:24:54 UTC (rev 7509)
@@ -308,7 +308,6 @@
 	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 @@
 		}
 		return;
 	}
-#endif
 
 	// Handling of jump pads
 	if(self.jumppadcount)



More information about the nexuiz-commits mailing list