X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fclient%2Fparticles.qc;h=11a1f0c9d6b5db05c8d61235b1ece805b76310be;hb=5efda48abe40b38172c2d7694472167d580629f7;hp=9312bc1c30060001af92de6732b4a63471aaea8c;hpb=4ed26683c8de16974a54d78754d328dca81a0773;p=xonotic%2Fxonotic-data.pk3dir.git 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";