]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/particles.qc
Merge remote branch 'refs/remotes/origin/fruitiex/racefixes'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / particles.qc
index d4a95b7754cddc37b6522ffa80d0930c2081d4f1..e9a02631f2e572c43c954b3a7c202201e1d0b316 100644 (file)
@@ -286,14 +286,18 @@ void Net_ReadZCurveParticles()
 void Net_ReadNexgunBeamParticle()
 {
        vector shotorg, endpos;
+       float charge;
        shotorg_x = ReadCoord(); shotorg_y = ReadCoord(); shotorg_z = ReadCoord();
        endpos_x = ReadCoord(); endpos_y = ReadCoord(); endpos_z = ReadCoord();
+       charge = ReadByte() / 255.0;
        
        pointparticles(particleeffectnum("nex_muzzleflash"), shotorg, normalize(endpos - shotorg) * 1000, 1);
        
        //draw either the old v2.3 beam or the new beam
+       charge = sqrt(charge); // divide evenly among trail spacing and alpha
+       particles_alphamin = particles_alphamax = charge;
        if (cvar("cl_particles_oldnexbeam") && (getstati(STAT_ALLOW_OLDNEXBEAM) || isdemo()))
-               WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3"), shotorg, endpos);
+               WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum("TE_TEI_G3"), shotorg, endpos, charge, 1);
        else
-               WarpZone_TrailParticles(world, particleeffectnum("nex_beam"), shotorg, endpos);
+               WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum("nex_beam"), shotorg, endpos, charge, 1);
 }