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

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Sep 1 02:47:37 EDT 2009


Author: div0
Date: 2009-09-01 02:47:37 -0400 (Tue, 01 Sep 2009)
New Revision: 7576

Modified:
   trunk/data/qcsrc/server/constants.qh
   trunk/data/qcsrc/server/func_breakable.qc
   trunk/data/qcsrc/server/g_triggers.qc
   trunk/data/qcsrc/server/t_plats.qc
   trunk/data/scripts/entities.def
Log:
spawnflag 256 on most damageable entities = ignore splash damage


Modified: trunk/data/qcsrc/server/constants.qh
===================================================================
--- trunk/data/qcsrc/server/constants.qh	2009-09-01 06:46:01 UTC (rev 7575)
+++ trunk/data/qcsrc/server/constants.qh	2009-09-01 06:47:37 UTC (rev 7576)
@@ -1,5 +1,5 @@
-string CVAR_CHECK_DEFAULT = "ff6f4ae047891b3b61ecfc5b3d3b38b4";
-string CVAR_CHECK_WEAPONS = "a7ca57b891d66754b856e24e5c1745e3";
+string CVAR_CHECK_DEFAULT = "ba4f55ed0f5a00a082bfb12c80dd3f8e";
+string CVAR_CHECK_WEAPONS = "6a27beecdcab1d3128a1f0f909257e0d";
 
 float	FALSE					= 0;
 float	TRUE					= 1;
@@ -166,3 +166,5 @@
 float NUM_PLAYERSKINS_TEAMPLAY = 3;
 
 float ASSAULT_VALUE_INACTIVE = 1000;
+
+float DOOR_NOSPLASH = 256; // generic anti-splashdamage spawnflag

Modified: trunk/data/qcsrc/server/func_breakable.qc
===================================================================
--- trunk/data/qcsrc/server/func_breakable.qc	2009-09-01 06:46:01 UTC (rev 7575)
+++ trunk/data/qcsrc/server/func_breakable.qc	2009-09-01 06:47:37 UTC (rev 7576)
@@ -172,6 +172,9 @@
 {
 	if(self.state == 1)
 		return;
+	if(self.spawnflags & DOOR_NOSPLASH)
+		if(!(DEATH_ISSPECIAL(deathtype)) && (deathtype & HITTYPE_SPLASH))
+			return;
 	if(self.team)
 		if(attacker.team == self.team)
 			return;

Modified: trunk/data/qcsrc/server/g_triggers.qc
===================================================================
--- trunk/data/qcsrc/server/g_triggers.qc	2009-09-01 06:46:01 UTC (rev 7575)
+++ trunk/data/qcsrc/server/g_triggers.qc	2009-09-01 06:47:37 UTC (rev 7576)
@@ -210,6 +210,9 @@
 {
 	if (!self.takedamage)
 		return;
+	if(self.spawnflags & DOOR_NOSPLASH)
+		if(!(DEATH_ISSPECIAL(deathtype)) && (deathtype & HITTYPE_SPLASH))
+			return;
 	self.health = self.health - damage;
 	if (self.health <= 0)
 	{

Modified: trunk/data/qcsrc/server/t_plats.qc
===================================================================
--- trunk/data/qcsrc/server/t_plats.qc	2009-09-01 06:46:01 UTC (rev 7575)
+++ trunk/data/qcsrc/server/t_plats.qc	2009-09-01 06:47:37 UTC (rev 7576)
@@ -551,6 +551,9 @@
 
 void button_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
 {
+	if(self.spawnflags & DOOR_NOSPLASH)
+		if(!(DEATH_ISSPECIAL(deathtype)) && (deathtype & HITTYPE_SPLASH))
+			return;
 	self.health = self.health - damage;
 	if (self.health <= 0)
 	{
@@ -867,6 +870,9 @@
 void door_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
 {
 	local entity oself;
+	if(self.spawnflags & DOOR_NOSPLASH)
+		if(!(DEATH_ISSPECIAL(deathtype)) && (deathtype & HITTYPE_SPLASH))
+			return;
 	self.health = self.health - damage;
 	if (self.health <= 0)
 	{

Modified: trunk/data/scripts/entities.def
===================================================================
--- trunk/data/scripts/entities.def	2009-09-01 06:46:01 UTC (rev 7575)
+++ trunk/data/scripts/entities.def	2009-09-01 06:47:37 UTC (rev 7576)
@@ -30,7 +30,7 @@
 noise1: Sound to be played to all players when the control point is captured.  Also good for an announcer voice ("Red Team has captured a control point")
 */
 
-/*QUAKED func_assault_destructible (.5 0 .5) ?
+/*QUAKED func_assault_destructible (.5 0 .5) ? - - - - - - - - NOSPLASH
 This is a brush model which can be damaged. Once triggered it's active and will happily receive damage players inflict upon it. Once all health is consumed it'll disappear and trigger the targeted entity/entities. As damage is received the brush model will be tinted in an increasingly visible flavor of red to give visible feedback.
 -------- KEYS --------
 health: The damage this trigger can take
@@ -57,6 +57,8 @@
 debrisfadetime: how long debris takes to fade
 debrisdamageforcescale: how much debris is affected by damage force (e.g. explosions)
 debrisskin: skin number of debris
+-------- SPAWNFLAGS --------
+NOSPLASH: if set, splash damage cannot activate the door, only direct damage can (requires health to be set)
 */
 
 /*QUAKED func_assault_wall (.5 0 .5) ?
@@ -81,7 +83,7 @@
 Y_AXIS: entity will bob along the Y axis.
 */
 
-/*QUAKED func_button (0 .5 .8) ? 
+/*QUAKED func_button (0 .5 .8) ? - - - - - - - - NOSPLASH
 When a button is touched by a player, it moves in the direction set by the "angle" key, triggers all its targets, stays pressed by an amount of time set by the "wait" key, then returns to it's original position where it can be operated again.
 -------- KEYS --------
 angle: determines the direction in which the button will move (up = -1, down = -2).
@@ -93,9 +95,11 @@
 wait: number of seconds button stays pressed (default 1, -1 = return immediately).
 lip: lip remaining at end of move (default 4 units).
 health: (default 0) if set to any non-zero value, the button must take damage (any amount) to activate.
+-------- SPAWNFLAGS --------
+NOSPLASH: if set, splash damage cannot activate the door, only direct damage can (requires health to be set)
 */
 
-/*QUAKED func_door (0 .5 .8) ? START_OPEN - DOOR_DONT_LINK - - TOGGLE
+/*QUAKED func_door (0 .5 .8) ? START_OPEN - DOOR_DONT_LINK - - TOGGLE - - NOSPLASH
 Normal sliding door entity. By default, the door will activate when player walks close to it or when damage is inflicted to it.
 If DOOR_DONT_LINK is not set, the door will be linked with all doors it touches. Note however that for linked doors to work properly, it is necessary that ALL linked doors have SOME volume of common area (that is, there must be a point that is part of ALL doors).
 -------- KEYS --------
@@ -115,9 +119,10 @@
 START_OPEN: causes the door to move to its destination when spawned, and operate in reverse.  It is used to temporarily or permanently close off an area when triggered (not useful for touch or damage triggered doors).
 DOOR_DONT_LINK: the door won't link with another door it touches
 TOGGLE: causes the door to wait in both the start and end states for a trigger event.
+NOSPLASH: if set, splash damage cannot activate the door, only direct damage can (requires health to be set)
 */
 
-/*QUAKED func_door_rotating (0 .5 .8) ? START_OPEN BIDIR DOOR_DONT_LINK BIDIR_IN_DOWN - TOGGLE X_AXIS Y_AXIS
+/*QUAKED func_door_rotating (0 .5 .8) ? START_OPEN BIDIR DOOR_DONT_LINK BIDIR_IN_DOWN - TOGGLE X_AXIS Y_AXIS NOSPLASH
 Normal rotating door entity that opens by rotating around an axis (default: Z). Use an origin brush to specify the rotation axis.
 By default, the door will activate when player walks close to it or when damage is inflicted to it.
 If DOOR_DONT_LINK is not set, the door will be linked with all doors it touches.
@@ -141,6 +146,7 @@
 START_OPEN: causes the door to move to its destination when spawned, and operate in reverse.  It is used to temporarily or permanently close off an area when triggered (not useful for touch or damage triggered doors).
 DOOR_DONT_LINK: the door won't link with another door it touches
 TOGGLE: causes the door to wait in both the start and end states for a trigger event.
+NOSPLASH: if set, splash damage cannot activate the door, only direct damage can (requires health to be set)
 */
 
 /*QUAKED func_door_secret (0 .5 .8) ? OPEN_ONCE 1ST_LEFT 1ST_DOWN NO_SHOOT ALWAYS_SHOOT
@@ -984,7 +990,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 ALLENTS
+/*QUAKED trigger_multiple (.5 .5 .5) ? NOTOUCH ALLENTS - - - - - - NOSPLASH
 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)
@@ -1002,9 +1008,10 @@
 -------- 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)
+NOSPLASH: if set, splash damage cannot activate the door, only direct damage can (requires health to be set)
 */
 
-/*QUAKED trigger_once (.5 .5 .5) ? NOTOUCH
+/*QUAKED trigger_once (.5 .5 .5) ? NOTOUCH - - - - - - - NOSPLASH
 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.
 Basically, it's a use-once trigger_multiple.
 -------- KEYS --------
@@ -1018,6 +1025,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)
+NOSPLASH: if set, splash damage cannot activate the door, only direct damage can (requires health to be set)
 */
 
 /*QUAKED trigger_push (1 .5 0) ? - - INVERT_TEAM
@@ -1432,7 +1440,7 @@
 ONLOAD: create a first entity on map load
 */
 
-/*QUAKED func_breakable (1 0 0) ? DISABLED INDICATE
+/*QUAKED func_breakable (1 0 0) ? DISABLED INDICATE - - - - - - NOSPLASH
 This is a brush model which can be damaged.
 Once all health is consumed it'll disappear and trigger the targeted entity/entities.
 When triggered, it resets to full health, and unbreaks.
@@ -1464,6 +1472,7 @@
 -------- SPAWNFLAGS --------
 DISABLED: do not allow damaging this until it is first activated
 INDICATE: indicate amount of damage already taken by coloring
+NOSPLASH: if set, splash damage cannot activate the door, only direct damage can (requires health to be set)
 */
 
 /*QUAKED trigger_relay_if (0 1 0) (-8 -8 -8) (8 8 8) NEGATE



More information about the nexuiz-commits mailing list