Module dpmod: Change committed

havoc at icculus.org havoc at icculus.org
Fri Sep 20 01:39:29 EDT 2002


Commiter   : havoc
CVSROOT    : /cvs/cvsroot/twilight
Module     : dpmod
Commit time: 2002-09-20 05:39:29 UTC

Log message:

allow damage to heads and gibs without causing th_die, this allows detection of severe gibbings from multiple rockets and other such situations

Modified files:
     qc/t_damage.qc qc/gore.qc

------=MIME.52c9cc915f1f2b5fc94c23b8cbddf755
Content-Type: text/plain; name="dpmod.20020920.053929.havoc.diff"
Content-Disposition: attachment; filename="dpmod.20020920.053929.havoc.diff"
Content-Transfer-Encoding: 8bit

Index: dpmod/qc/gore.qc
diff -u dpmod/qc/gore.qc:1.1.1.1 dpmod/qc/gore.qc:1.2
--- dpmod/qc/gore.qc:1.1.1.1	Thu Sep 19 15:08:11 2002
+++ dpmod/qc/gore.qc	Fri Sep 20 01:39:18 2002
@@ -72,6 +72,10 @@
 	e.alpha = 1;
 	e.think = debristhink;
 	e.nextthink = time;
+	e.takedamage = DAMAGE_YES;
+	e.th_die = SUB_Null;
+	e.th_gib = SUB_Null;
+	e.th_pain = SUB_Null;
 	if (maxclients == 1)
 		e.cnt = time + 3000;
 	else
Index: dpmod/qc/t_damage.qc
diff -u dpmod/qc/t_damage.qc:1.1.1.1 dpmod/qc/t_damage.qc:1.2
--- dpmod/qc/t_damage.qc:1.1.1.1	Thu Sep 19 15:07:10 2002
+++ dpmod/qc/t_damage.qc	Fri Sep 20 01:39:18 2002
@@ -282,20 +282,24 @@
 	targ.regenthink = time + 2; // stop regeneration for 2 sec
 
 	targ.deathmsg = dethtype;
-	if (targ.iscorpse)
+	if (targ.th_die)
+	if (targ.th_die != SUB_Null)
 	{
-		if (targ.bodyhealth < 1)
+		if (targ.iscorpse)
 		{
-			Killed (targ, attacker, dethtype, damgtype, obitfunc);
-			return;
+			if (targ.bodyhealth < 1)
+			{
+				Killed (targ, attacker, dethtype, damgtype, obitfunc);
+				return;
+			}
 		}
-	}
-	else
-	{
-		if (targ.health < 1)
+		else
 		{
-			Killed (targ, attacker, dethtype, damgtype, obitfunc);
-			return;
+			if (targ.health < 1)
+			{
+				Killed (targ, attacker, dethtype, damgtype, obitfunc);
+				return;
+			}
 		}
 	}
 


More information about the twilight-commits mailing list