r5035 - in trunk/data: qcsrc/server scripts

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Nov 10 10:56:27 EST 2008


Author: div0
Date: 2008-11-10 10:56:27 -0500 (Mon, 10 Nov 2008)
New Revision: 5035

Modified:
   trunk/data/qcsrc/server/assault.qc
   trunk/data/qcsrc/server/cl_client.qc
   trunk/data/qcsrc/server/race.qc
   trunk/data/scripts/entities.def
Log:
target2 handling improved


Modified: trunk/data/qcsrc/server/assault.qc
===================================================================
--- trunk/data/qcsrc/server/assault.qc	2008-11-10 15:52:19 UTC (rev 5034)
+++ trunk/data/qcsrc/server/assault.qc	2008-11-10 15:56:27 UTC (rev 5035)
@@ -132,6 +132,8 @@
 
 // decrease the health of targeted objectives
 void assault_objective_decrease_use() {
+	if(other.classname == "info_player_deathmatch") // a spawn, a spawn
+		return;
 
 	if(self.cnt > 0) {
 		// did already fire

Modified: trunk/data/qcsrc/server/cl_client.qc
===================================================================
--- trunk/data/qcsrc/server/cl_client.qc	2008-11-10 15:52:19 UTC (rev 5034)
+++ trunk/data/qcsrc/server/cl_client.qc	2008-11-10 15:56:27 UTC (rev 5035)
@@ -1,4 +1,3 @@
-// let's abuse an existing field
 #define SPAWNPOINT_SCORE frags
 
 .float wantswelcomemessage;
@@ -621,7 +620,6 @@
 
 	if(self.classname == "player") {
 		entity spot, oldself;
-		string s;
 
 		race_PreSpawn();
 
@@ -792,15 +790,12 @@
 
 		target_voicescript_clear(self);
 
-		s = spot.target;
-		spot.target = string_null;
-			oldself = self;
-			self = spot;
-				activator = oldself;
-					SUB_UseTargets();
-				activator = world;
-			self = oldself;
-		spot.target = s;
+		oldself = self;
+		self = spot;
+			activator = oldself;
+				SUB_UseTargets();
+			activator = world;
+		self = oldself;
 
 	} else if(self.classname == "observer") {
 		PutObserverInServer ();

Modified: trunk/data/qcsrc/server/race.qc
===================================================================
--- trunk/data/qcsrc/server/race.qc	2008-11-10 15:52:19 UTC (rev 5034)
+++ trunk/data/qcsrc/server/race.qc	2008-11-10 15:56:27 UTC (rev 5035)
@@ -386,6 +386,9 @@
 
 void checkpoint_use()
 {
+	if(other.classname == "info_player_deathmatch") // a spawn, a spawn
+		return;
+
 	other = activator;
 	checkpoint_passed();
 }

Modified: trunk/data/scripts/entities.def
===================================================================
--- trunk/data/scripts/entities.def	2008-11-10 15:52:19 UTC (rev 5034)
+++ trunk/data/scripts/entities.def	2008-11-10 15:56:27 UTC (rev 5035)
@@ -229,7 +229,7 @@
 Normal player spawning location in game types without team spawns. Should touch the floor, but not the walls, and should point where the player should look when he spawns there.
 -------- KEYS --------
 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.
-target2: trigger all entities with this targetname when someone spawns
+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.
 */
 
@@ -245,7 +245,7 @@
 Red team's player spawning location in e.g. CTF and Onslaught. Should touch the floor, but not the walls, and should point where the player should look when he spawns there.
 -------- KEYS --------
 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.
-target2: trigger all entities with this targetname when someone spawns
+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.
 */
 
@@ -253,7 +253,7 @@
 Blue team's player spawning location in e.g. CTF and Onslaught. Should touch the floor, but not the walls, and should point where the player should look when he spawns there.
 -------- KEYS --------
 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.
-target2: trigger all entities with this targetname when someone spawns
+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.
 */
 
@@ -261,7 +261,7 @@
 Yellow team's player spawning location, but there is no game mode to use this yet. Anyway, should touch the floor, but not the walls, and should point where the player should look when he spawns there.
 -------- KEYS --------
 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.
-target2: trigger all entities with this targetname when someone spawns
+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.
 */
 
@@ -269,7 +269,7 @@
 Pink team's player spawning location, but there is no game mode to use this yet. Anyway, should touch the floor, but not the walls, and should point where the player should look when he spawns there.
 -------- KEYS --------
 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.
-target2: trigger all entities with this targetname when someone spawns
+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.
 */
 




More information about the nexuiz-commits mailing list