r3720 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Jun 27 10:12:19 EDT 2008


Author: div0
Date: 2008-06-27 10:12:17 -0400 (Fri, 27 Jun 2008)
New Revision: 3720

Modified:
   trunk/data/qcsrc/server/cl_client.qc
   trunk/data/qcsrc/server/sv_main.qc
Log:
fix spawning


Modified: trunk/data/qcsrc/server/cl_client.qc
===================================================================
--- trunk/data/qcsrc/server/cl_client.qc	2008-06-27 12:25:11 UTC (rev 3719)
+++ trunk/data/qcsrc/server/cl_client.qc	2008-06-27 14:12:17 UTC (rev 3720)
@@ -111,10 +111,30 @@
 				spotlistend = spot;
 				if(!spotlist)
 					spotlist = spot;
+
+				/*
+				if(teamcheck)
+				if(spot.team != teamcheck)
+					error("invalid spawn added");
+				*/
+
+				print("added ", etos(spot), "\n");
 			}
 		}
 	}
+	spotlistend.chain = world;
 
+	/*
+		entity e;
+		if(teamcheck)
+			for(e = spotlist; e; e = e.chain)
+			{
+				print("seen ", etos(e), "\n");
+				if(e.team != teamcheck)
+					error("invalid spawn found");
+			}
+	*/
+
 	return spotlist;
 }
 
@@ -182,6 +202,12 @@
 	if(cvar("spawn_debugview"))
 	{
 		print("spot mindistance: ", ftos(spot.frags), "\n");
+
+		entity e;
+		if(teamcheck)
+			for(e = firstspot; e; e = e.chain)
+				if(e.team != teamcheck)
+					error("invalid spawn found");
 	}
 
 	if (!spot)

Modified: trunk/data/qcsrc/server/sv_main.qc
===================================================================
--- trunk/data/qcsrc/server/sv_main.qc	2008-06-27 12:25:11 UTC (rev 3719)
+++ trunk/data/qcsrc/server/sv_main.qc	2008-06-27 14:12:17 UTC (rev 3720)
@@ -178,6 +178,10 @@
 
 	if(cvar("spawn_debugview"))
 	{
+		RandomSelection_Init();
+		for(self = world; (self = find(self, classname, "player")); )
+			RandomSelection_Add(self, 0, 1);
+		self = RandomSelection_chosen_ent;
 		SelectSpawnPoint(0);
 	}
 }




More information about the nexuiz-commits mailing list