[nexuiz-commits] r6954 - in trunk/data: qcsrc/server scripts

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Jun 10 03:15:35 EDT 2009


Author: div0
Date: 2009-06-10 03:15:32 -0400 (Wed, 10 Jun 2009)
New Revision: 6954

Modified:
   trunk/data/qcsrc/server/cl_client.qc
   trunk/data/scripts/entities.def
Log:
restricted spawnpoints (1 = bot only, 2 = human only)


Modified: trunk/data/qcsrc/server/cl_client.qc
===================================================================
--- trunk/data/qcsrc/server/cl_client.qc	2009-06-10 07:07:02 UTC (rev 6953)
+++ trunk/data/qcsrc/server/cl_client.qc	2009-06-10 07:15:32 UTC (rev 6954)
@@ -1,6 +1,7 @@
 .float spectatee_status;
 .float zoomstate;
 .float bloodloss_timer;
+.float restriction;
 
 .entity clientdata;
 float ClientData_Send(entity to, float sf)
@@ -118,6 +119,17 @@
 	if(race_spawns)
 		if(spot.target == "")
 			return -1;
+	
+	if(clienttype(self) == CLIENTTYPE_REAL)
+	{
+		if(spot.restriction == 1)
+			return -1;
+	}
+	else
+	{
+		if(spot.restriction == 2)
+			return -1;
+	}
 
 	// filter out spots for assault
 	if(spot.target != "") {

Modified: trunk/data/scripts/entities.def
===================================================================
--- trunk/data/scripts/entities.def	2009-06-10 07:07:02 UTC (rev 6953)
+++ trunk/data/scripts/entities.def	2009-06-10 07:15:32 UTC (rev 6954)
@@ -281,6 +281,7 @@
 target: this should point to a target_objective to decide when this spawning point is active.
 target2: trigger all entities with this targetname when someone spawns
 cnt: weight of spawn point for random selection. Set to a lower value if you have many spawn points close together. Default value is 1.
+restriction: when 1, only bots can spawn here; when 2, only humans can spawn here (be careful with these, or the game will crash because someone cannot spawn)
 */
 
 /*QUAKED info_player_deathmatch (0 1 0) (-16 -16 -24) (16 16 45) 
@@ -289,6 +290,7 @@
 cnt: weight of spawn point for random selection. Set to a lower value if you have many spawn points close together. Default value is 1.
 target: trigger all entities with this targetname when someone spawns
 targetname: when targeted by a func_button, pressing the button will assign the spawn point to the team of the activator as an additional spawn point, or reassign it if it was already assigned. Also used to assign spawn points to Onslaught control points.
+restriction: when 1, only bots can spawn here; when 2, only humans can spawn here (be careful with these, or the game will crash because someone cannot spawn)
 */
 
 /*QUAKED info_player_defender (.5 .5 .5) (-16 -16 -24) (16 16 45) 
@@ -297,6 +299,7 @@
 target: this should point to a target_objective to decide when this spawning point is active.
 target2: trigger all entities with this targetname when someone spawns
 cnt: weight of spawn point for random selection. Set to a lower value if you have many spawn points close together. Default value is 1.
+restriction: when 1, only bots can spawn here; when 2, only humans can spawn here (be careful with these, or the game will crash because someone cannot spawn)
 */
 
 /*QUAKED info_player_team1 (1 0 0) (-16 -16 -24) (16 16 45) 
@@ -305,6 +308,7 @@
 cnt: weight of spawn point for random selection. Set to a lower value if you have many spawn points close together. Default value is 1.
 target: trigger all entities with this targetname when someone spawns
 targetname: when targeted by a func_button, pressing the button will reassign the spawn point to the team of the activator. If a team has no more spawn point left, it immediately loses.
+restriction: when 1, only bots can spawn here; when 2, only humans can spawn here (be careful with these, or the game will crash because someone cannot spawn)
 */
 
 /*QUAKED info_player_team2 (0 0 1) (-16 -16 -24) (16 16 45) 
@@ -313,6 +317,7 @@
 cnt: weight of spawn point for random selection. Set to a lower value if you have many spawn points close together. Default value is 1.
 target: trigger all entities with this targetname when someone spawns
 targetname: when targeted by a func_button, pressing the button will reassign the spawn point to the team of the activator. If a team has no more spawn point left, it immediately loses.
+restriction: when 1, only bots can spawn here; when 2, only humans can spawn here (be careful with these, or the game will crash because someone cannot spawn)
 */
 
 /*QUAKED info_player_team3 (1 1 0) (-16 -16 -24) (16 16 45) 
@@ -321,6 +326,7 @@
 cnt: weight of spawn point for random selection. Set to a lower value if you have many spawn points close together. Default value is 1.
 target: trigger all entities with this targetname when someone spawns
 targetname: when targeted by a func_button, pressing the button will reassign the spawn point to the team of the activator. If a team has no more spawn point left, it immediately loses.
+restriction: when 1, only bots can spawn here; when 2, only humans can spawn here (be careful with these, or the game will crash because someone cannot spawn)
 */
 
 /*QUAKED info_player_team4 (1 0 1) (-16 -16 -24) (16 16 45) 
@@ -329,6 +335,7 @@
 cnt: weight of spawn point for random selection. Set to a lower value if you have many spawn points close together. Default value is 1.
 target: trigger all entities with this targetname when someone spawns
 targetname: when targeted by a func_button, pressing the button will reassign the spawn point to the team of the activator. If a team has no more spawn point left, it immediately loses.
+restriction: when 1, only bots can spawn here; when 2, only humans can spawn here (be careful with these, or the game will crash because someone cannot spawn)
 */
 
 /*QUAKED item_armor_large (.4 .8 .4) (-30 -30 0) (30 30 32) FLOATING
@@ -1234,6 +1241,7 @@
 target2: trigger all entities with this targetname when someone spawns
 cnt: weight of spawn point for random selection. Set to a lower value if you have many spawn points close together. Default value is 1.
 race_place: if target points to the trigger_race_checkpoint with cnt 0 (finish line), this sets which place the spawn corresponds to; the special value 0 stands for spawns for players who come in later (have to be behind the ones with race_place set to an actual place), and -1 marks the spawnpoint for qualifying mode only
+restriction: when 1, only bots can spawn here; when 2, only humans can spawn here (be careful with these, or the game will crash because someone cannot spawn)
 */
 
 /*QUAKED func_pointparticles (.5 .5 .5) ? START_ON IMPULSE



More information about the nexuiz-commits mailing list