From edbbbc4984ea64c74451f1470622259a27b56130 Mon Sep 17 00:00:00 2001 From: div0 Date: Sat, 30 Aug 2008 14:13:12 +0000 Subject: [PATCH] fix compile errors; make sky-hitting lasers extend to infinity git-svn-id: svn://svn.icculus.org/nexuiz/trunk@4259 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/client/laser.qc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/data/qcsrc/client/laser.qc b/data/qcsrc/client/laser.qc index dd389b16b..08de0522f 100644 --- a/data/qcsrc/client/laser.qc +++ b/data/qcsrc/client/laser.qc @@ -80,6 +80,11 @@ void InterpolateOrigin_Undo() .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 @@ void Draw_Laser() { 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) { -- 2.39.2