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