r2147 - in trunk/data: . qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sat Jan 27 09:28:01 EST 2007


Author: div0
Date: 2007-01-27 09:28:01 -0500 (Sat, 27 Jan 2007)
New Revision: 2147

Modified:
   trunk/data/default.cfg
   trunk/data/qcsrc/server/bots.qc
   trunk/data/qcsrc/server/defs.qh
   trunk/data/qcsrc/server/g_world.qc
Log:
waypoints out of items configurable;
no makestatic-ed lights


Modified: trunk/data/default.cfg
===================================================================
--- trunk/data/default.cfg	2007-01-27 14:26:13 UTC (rev 2146)
+++ trunk/data/default.cfg	2007-01-27 14:28:01 UTC (rev 2147)
@@ -817,3 +817,5 @@
 
 net_banlist ""
 seta _alientrap_net_banlist ""
+
+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: trunk/data/qcsrc/server/bots.qc
===================================================================
--- trunk/data/qcsrc/server/bots.qc	2007-01-27 14:26:13 UTC (rev 2146)
+++ trunk/data/qcsrc/server/bots.qc	2007-01-27 14:28:01 UTC (rev 2147)
@@ -591,7 +591,7 @@
 	setorigin(w, org);
 	setsize(w, m1, m2);
 	waypoint_clearlinks(w);
-	waypoint_schedulerelink(w);
+	//waypoint_schedulerelink(w);
 	return w;
 };
 
@@ -601,7 +601,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
@@ -768,6 +768,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;
@@ -2027,6 +2031,7 @@
 	{
 		botframe_spawnedwaypoints = TRUE;
 		waypoint_loadall();
+		waypoint_schedulerelinkall();
 	}
 
 	if (bot_list)

Modified: trunk/data/qcsrc/server/defs.qh
===================================================================
--- trunk/data/qcsrc/server/defs.qh	2007-01-27 14:26:13 UTC (rev 2146)
+++ trunk/data/qcsrc/server/defs.qh	2007-01-27 14:28:01 UTC (rev 2147)
@@ -306,3 +306,5 @@
 void centerprint(entity e, string s);
 
 .float respawn_countdown; // next number to count
+
+float bot_waypoints_for_items;

Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc	2007-01-27 14:26:13 UTC (rev 2146)
+++ trunk/data/qcsrc/server/g_world.qc	2007-01-27 14:28:01 UTC (rev 2147)
@@ -1,3 +1,5 @@
+float SPAWNFLAG_NO_WAYPOINTS_FOR_ITEMS = 1;
+
 string GetMapname();
 void GotoNextMap();
 void HandleMaplistShuffleCommands();
@@ -298,7 +300,7 @@
 		ambientsound ('0 0 0', self.noise, 1.00, ATTN_NONE);
 	}
 
-		// 0 normal
+	// 0 normal
 	lightstyle(0, "m");
 
 	// 1 FLICKER (first variety)
@@ -348,6 +350,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();
 
@@ -411,7 +418,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