r4396 - in trunk/data: qcsrc/server scripts

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Sep 7 09:45:14 EDT 2008


Author: div0
Date: 2008-09-07 09:45:13 -0400 (Sun, 07 Sep 2008)
New Revision: 4396

Modified:
   trunk/data/qcsrc/server/g_triggers.qc
   trunk/data/scripts/entities.def
Log:
trigger_multiple: add ALLENTS spawnflag (to respond to touches by ALL entities, not just players)


Modified: trunk/data/qcsrc/server/g_triggers.qc
===================================================================
--- trunk/data/qcsrc/server/g_triggers.qc	2008-09-07 13:36:17 UTC (rev 4395)
+++ trunk/data/qcsrc/server/g_triggers.qc	2008-09-07 13:45:13 UTC (rev 4396)
@@ -172,12 +172,15 @@
 
 void multi_touch()
 {
-	if (other.classname != "player")
-		return;
+	if not(self.spawnflags & 2)
+	{
+		if (other.classname != "player")
+			return;
 
-    if(self.team)
-    if(self.team == other.team)
-        return;
+		if(self.team)
+		if(self.team == other.team)
+			return;
+	}
 
 // if the trigger has an angles field, check player's facing direction
 	if (self.movedir != '0 0 0')

Modified: trunk/data/scripts/entities.def
===================================================================
--- trunk/data/scripts/entities.def	2008-09-07 13:36:17 UTC (rev 4395)
+++ trunk/data/scripts/entities.def	2008-09-07 13:45:13 UTC (rev 4396)
@@ -721,7 +721,7 @@
 falloff: "gravity field": 0 means no falloff, 1 means linear falloff (zero at the outside), 2 means inverted linear falloff (zero at the inside)
 */
 
-/*QUAKED trigger_multiple (.5 .5 .5) ? NOTOUCH
+/*QUAKED trigger_multiple (.5 .5 .5) ? NOTOUCH ALLENTS
 Variable sized repeatable trigger.  Must be targeted at one or more entities.  If "health" is set, the trigger must be killed to activate each time.
 -------- KEYS --------
 health: amount of damage that has to be dealt to the trigger to activate (it then won't respond to merely touching it)
@@ -735,6 +735,7 @@
 killtarget: remove all entities with this targetname when triggered
 -------- SPAWNFLAGS --------
 NOTOUCH: the trigger can only be triggered by other entities, not by touching or firing (you should probably use trigger_relay or trigger_delay instead)
+ALLENTS: the trigger responds to all entities, not just players (useful for targetting trigger_items)
 */
 
 /*QUAKED trigger_once (.5 .5 .5) ? NOTOUCH




More information about the nexuiz-commits mailing list