r4205 - trunk/data/qcsrc/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Aug 26 12:47:19 EDT 2008


Author: div0
Date: 2008-08-26 12:47:19 -0400 (Tue, 26 Aug 2008)
New Revision: 4205

Modified:
   trunk/data/qcsrc/client/particles.qc
Log:
workaround: traceline appears to not hit SOLID_BSP csqc entities, no idea why


Modified: trunk/data/qcsrc/client/particles.qc
===================================================================
--- trunk/data/qcsrc/client/particles.qc	2008-08-26 16:09:22 UTC (rev 4204)
+++ trunk/data/qcsrc/client/particles.qc	2008-08-26 16:47:19 UTC (rev 4205)
@@ -1,4 +1,8 @@
+#ifdef POINTINBRUSH_WORKS
 vector PointInBrush_vec;
+entity PointInBrush_brush;
+entity PointInBrush_allmask;
+.float dphitcontentsmask;
 float PointInBrush_Recurse()
 {
 	float s;
@@ -8,7 +12,7 @@
 	traceline(PointInBrush_vec, PointInBrush_vec, 0, world);
 	if not(trace_ent)
 		return 0;
-	if(trace_ent == self)
+	if(trace_ent == PointInBrush_brush)
 		return 1;
 
 	se = trace_ent;
@@ -23,17 +27,19 @@
 {
 	float f, s;
 
-	if not(self.modelindex)
+	if not(brush.modelindex)
 		return 1;
 
-	s = self.solid;
-	self.solid = SOLID_BSP;
+	s = brush.solid;
+	brush.solid = SOLID_BSP;
 	PointInBrush_vec = point;
+	PointInBrush_brush = brush;
 	f = PointInBrush_Recurse();
-	self.solid = s;
+	brush.solid = s;
 
 	return f;
 }
+#endif
 
 .float cnt; // effect number
 .vector velocity; // particle velocity
@@ -61,7 +67,9 @@
 		p_x += random() * sz_x;
 		p_y += random() * sz_y;
 		p_z += random() * sz_z;
+#ifdef POINTINBRUSH_WORKS
 		if(PointInBrush(self, p))
+#endif
 		{
 			if(self.movedir != '0 0 0')
 			{
@@ -77,11 +85,13 @@
 				sound(self, CHAN_AUTO, self.noise, 1, ATTN_NORM);
 			}
 		}
+#ifdef POINTINBRUSH_WORKS
 		else if(self.absolute)
 		{
 			++fail;
 			--i;
 		}
+#endif
 	}
 	self.origin = o;
 }




More information about the nexuiz-commits mailing list