From c33d829fe1ee949dae6237f7a1bd29ae30d109fc Mon Sep 17 00:00:00 2001 From: div0 Date: Sat, 30 Aug 2008 14:07:47 +0000 Subject: [PATCH] detect NOIMPACT flag for laser (TODO: possibly extend the laser to infinity if it hits sky? need a test map for this first) git-svn-id: svn://svn.icculus.org/nexuiz/trunk@4258 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/client/laser.qc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/data/qcsrc/client/laser.qc b/data/qcsrc/client/laser.qc index 0df0a5b57..dd389b16b 100644 --- a/data/qcsrc/client/laser.qc +++ b/data/qcsrc/client/laser.qc @@ -102,10 +102,13 @@ void Draw_Laser() { Draw_CylindricLine(self.origin, trace_endpos, 2, "particles/laserbeam", 0, time * 3, self.colormod, 0.5, DRAWFLAG_ADDITIVE); // TODO make a texture to make the laser look smoother } - if(self.cnt >= 0) - pointparticles(self.cnt, trace_endpos, trace_plane_normal, drawframetime * 1000); - if(self.colormod != '0 0 0') - R_AddDynamicLight(trace_endpos + trace_plane_normal * 1, 50, self.colormod * 5); + if not(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT) + { + if(self.cnt >= 0) + pointparticles(self.cnt, trace_endpos, trace_plane_normal, drawframetime * 1000); + if(self.colormod != '0 0 0') + R_AddDynamicLight(trace_endpos + trace_plane_normal * 1, 50, self.colormod * 5); + } } void Ent_Laser() -- 2.39.2