r2146 - in branches/nexuiz-2.0/data: . qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sat Jan 27 09:26:13 EST 2007


Author: div0
Date: 2007-01-27 09:26:13 -0500 (Sat, 27 Jan 2007)
New Revision: 2146

Modified:
   branches/nexuiz-2.0/data/default.cfg
   branches/nexuiz-2.0/data/qcsrc/server/bots.qc
   branches/nexuiz-2.0/data/qcsrc/server/defs.qh
   branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
Log:
waypoints-from-items now configurable;
nobody needs makestatic-ed lights


Modified: branches/nexuiz-2.0/data/default.cfg
===================================================================
--- branches/nexuiz-2.0/data/default.cfg	2007-01-25 12:06:42 UTC (rev 2145)
+++ branches/nexuiz-2.0/data/default.cfg	2007-01-27 14:26:13 UTC (rev 2146)
@@ -797,3 +797,5 @@
 alias teamstatus "set _scoreboard 1"
 
 con_chatwidth 1.0
+
+set g_waypoints_for_items 1 // make waypoints out of items; values: 0 = never, 1 = unless the mapper prevents it by worldspawn.spawnflags & 1, 2 = always

Modified: branches/nexuiz-2.0/data/qcsrc/server/bots.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/bots.qc	2007-01-25 12:06:42 UTC (rev 2145)
+++ branches/nexuiz-2.0/data/qcsrc/server/bots.qc	2007-01-27 14:26:13 UTC (rev 2146)
@@ -585,7 +585,7 @@
 	setorigin(w, org);
 	setsize(w, m1, m2);
 	waypoint_clearlinks(w);
-	waypoint_schedulerelink(w);
+	//waypoint_schedulerelink(w);
 	return w;
 };
 
@@ -595,7 +595,7 @@
 	setorigin(self, self.origin);
 	// schedule a relink after other waypoints have had a chance to spawn
 	waypoint_clearlinks(self);
-	waypoint_schedulerelink(self);
+	//waypoint_schedulerelink(self);
 };
 
 // remove a waypoint, and schedule all neighbors to relink
@@ -762,6 +762,10 @@
 {
 	local entity w;
 	local vector org;
+
+	if(!bot_waypoints_for_items)
+		return;
+
 	org = e.origin + (e.mins + e.maxs) * 0.5;
 	org_z = e.origin_z + e.mins_z - PL_MIN_z + 1;
 	e.nearestwaypointtimeout = time + 1000000000;
@@ -1923,6 +1927,7 @@
 	{
 		botframe_spawnedwaypoints = TRUE;
 		waypoint_loadall();
+		waypoint_schedulerelinkall();
 	}
 
 	if (bot_list)

Modified: branches/nexuiz-2.0/data/qcsrc/server/defs.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/defs.qh	2007-01-25 12:06:42 UTC (rev 2145)
+++ branches/nexuiz-2.0/data/qcsrc/server/defs.qh	2007-01-27 14:26:13 UTC (rev 2146)
@@ -306,3 +306,5 @@
 void centerprint(entity e, string s);
 
 .float respawn_countdown; // next number to count
+
+float bot_waypoints_for_items;

Modified: branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_world.qc	2007-01-25 12:06:42 UTC (rev 2145)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_world.qc	2007-01-27 14:26:13 UTC (rev 2146)
@@ -1,3 +1,5 @@
+float SPAWNFLAG_NO_WAYPOINTS_FOR_ITEMS = 1;
+
 string GetMapname();
 void GotoNextMap();
 void HandleMaplistShuffleCommands();
@@ -295,7 +297,7 @@
 		ambientsound ('0 0 0', self.noise, 1.00, ATTN_NONE);
 	}
 
-		// 0 normal
+	// 0 normal
 	lightstyle(0, "m");
 
 	// 1 FLICKER (first variety)
@@ -345,6 +347,11 @@
 
 	GotoFirstMap();
 
+	bot_waypoints_for_items = cvar("g_waypoints_for_items");
+	if(bot_waypoints_for_items == 1)
+		if(self.spawnflags & SPAWNFLAG_NO_WAYPOINTS_FOR_ITEMS)
+			bot_waypoints_for_items = 0;
+
 	if(cvar("g_campaign"))
 		CampaignPreInit();
 
@@ -408,7 +415,8 @@
 
 void light (void)
 {
-	makestatic (self);
+	//makestatic (self); // Who the f___ did that?
+	remove(self);
 }
 
 float( string pFilename ) TryFile =




More information about the nexuiz-commits mailing list