1 #include "particles.qh"
3 #include "../common/stats.qh"
5 #include "../lib/warpzone/common.qh"
7 void Net_ReadVortexBeamParticle()
9 vector shotorg, endpos;
11 shotorg.x = ReadCoord(); shotorg.y = ReadCoord(); shotorg.z = ReadCoord();
12 endpos.x = ReadCoord(); endpos.y = ReadCoord(); endpos.z = ReadCoord();
13 charge = ReadByte() / 255.0;
15 pointparticles(particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH), shotorg, normalize(endpos - shotorg) * 1000, 1);
17 //draw either the old v2.3 beam or the new beam
18 charge = sqrt(charge); // divide evenly among trail spacing and alpha
19 particles_alphamin = particles_alphamax = particles_fade = charge;
21 if (autocvar_cl_particles_oldvortexbeam && (getstati(STAT_ALLOW_OLDVORTEXBEAM) || isdemo()))
22 WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum(EFFECT_VORTEX_BEAM_OLD), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
24 WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum(EFFECT_VORTEX_BEAM), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);