r4259 - trunk/data/qcsrc/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sat Aug 30 10:13:12 EDT 2008


Author: div0
Date: 2008-08-30 10:13:12 -0400 (Sat, 30 Aug 2008)
New Revision: 4259

Modified:
   trunk/data/qcsrc/client/laser.qc
Log:
fix compile errors; make sky-hitting lasers extend to infinity


Modified: trunk/data/qcsrc/client/laser.qc
===================================================================
--- trunk/data/qcsrc/client/laser.qc	2008-08-30 14:07:47 UTC (rev 4258)
+++ trunk/data/qcsrc/client/laser.qc	2008-08-30 14:13:12 UTC (rev 4259)
@@ -80,6 +80,11 @@
 .vector velocity;
 .float alpha;
 
+// TODO move these into a heade file
+float trace_dphitq3surfaceflags;
+float Q3SURFACEFLAG_SKY = 4; // sky surface (also has NOIMPACT and NOMARKS set)
+float Q3SURFACEFLAG_NOIMPACT = 16; // projectiles should remove themselves on impact (this is set on sky)
+
 void Draw_Laser()
 {
 	if(!self.state)
@@ -93,6 +98,8 @@
 	{
 		makevectors(self.angles);
 		traceline(self.origin, self.origin + v_forward * 32768, 0, self);
+		if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_SKY)
+			trace_endpos = self.origin + v_forward * 1048576;
 	}
 	if(self.alpha)
 	{




More information about the nexuiz-commits mailing list