r4917 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Oct 27 11:16:05 EDT 2008


Author: div0
Date: 2008-10-27 11:16:05 -0400 (Mon, 27 Oct 2008)
New Revision: 4917

Modified:
   trunk/data/qcsrc/server/g_damage.qc
Log:
account for the case that a Damage function may remove(self) (currently this would abort the RadiusDamage loop, leaving some entities undamaged)


Modified: trunk/data/qcsrc/server/g_damage.qc
===================================================================
--- trunk/data/qcsrc/server/g_damage.qc	2008-10-27 11:23:38 UTC (rev 4916)
+++ trunk/data/qcsrc/server/g_damage.qc	2008-10-27 15:16:05 UTC (rev 4917)
@@ -832,6 +832,7 @@
 	vector  center;
 	vector  nearest;
 	float   total_damage_to_creatures;
+	entity  next;
 
 	if(RadiusDamage_running)
 	{
@@ -854,6 +855,7 @@
 	targ = findradius (blastorigin, rad);
 	while (targ)
 	{
+		next = targ.chain;
 		if (targ != inflictor)
 			if (ignore != targ)
 			{
@@ -906,7 +908,7 @@
 					}
 				}
 			}
-		targ = targ.chain;
+		targ = next;
 	}
 
 	RadiusDamage_running = 0;




More information about the nexuiz-commits mailing list