From 5efda48abe40b38172c2d7694472167d580629f7 Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Wed, 19 Feb 2014 01:36:17 -0500 Subject: [PATCH] Experiment with beam_traileffect and add comment for beam_hitlight / beam_muzzlelight --- qcsrc/client/particles.qc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/qcsrc/client/particles.qc b/qcsrc/client/particles.qc index 9312bc1c3..11a1f0c9d 100644 --- a/qcsrc/client/particles.qc +++ b/qcsrc/client/particles.qc @@ -370,6 +370,8 @@ void Net_ReadShockwaveParticle() .float beam_muzzleflash; .string beam_image; +// WEAPONTODO: Add beam_hitlight and beam_muzzlelight which uses direct real time light control + .entity beam_muzzleentity; .float beam_usevieworigin; @@ -619,6 +621,7 @@ void Draw_ArcBeam() //float falloff = 1; #endif + // draw primary beam render vector top = hitorigin + (thickdir * self.beam_thickness); vector bottom = hitorigin - (thickdir * self.beam_thickness); @@ -629,6 +632,15 @@ void Draw_ArcBeam() R_PolygonVertex(bottom, '0 0.5 0' * (1 - (self.beam_thickness / maxthickness)), self.beam_color, self.beam_alpha); R_EndPolygon(); + // draw trailing particles + // NOTES: + // - Don't use spammy particle counts here, use a FEW small particles around the beam + // - We're not using WarpZone_TrailParticles here because we will handle warpzones ourselves. + if(self.beam_traileffect) + { + trailparticles(self, self.beam_traileffect, last_origin, hitorigin); + } + // check if we're going to proceed with drawing if(trace_fraction != 1) { @@ -812,7 +824,7 @@ void Ent_ReadArcBeam(float isnew) self.beam_color = '1 0 1'; self.beam_alpha = 0.5; self.beam_thickness = 8; - self.beam_traileffect = FALSE; + self.beam_traileffect = particleeffectnum("nex_beam"); self.beam_hiteffect = particleeffectnum("electro_lightning"); self.beam_muzzleflash = FALSE; //particleeffectnum("nex_muzzleflash"); self.beam_image = "particles/lgbeam"; -- 2.39.2