]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/client/particles.qc
59b9b75f46c7b4c781f319c3ce1bbd801577ca7e
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / particles.qc
1 #include "particles.qh"
2
3 void Net_ReadVortexBeamParticle()
4 {
5         vector shotorg, endpos;
6         float charge;
7         shotorg.x = ReadCoord(); shotorg.y = ReadCoord(); shotorg.z = ReadCoord();
8         endpos.x = ReadCoord(); endpos.y = ReadCoord(); endpos.z = ReadCoord();
9         charge = ReadByte() / 255.0;
10
11         pointparticles(particleeffectnum("nex_muzzleflash"), shotorg, normalize(endpos - shotorg) * 1000, 1);
12
13         //draw either the old v2.3 beam or the new beam
14         charge = sqrt(charge); // divide evenly among trail spacing and alpha
15         particles_alphamin = particles_alphamax = particles_fade = charge;
16
17         if (autocvar_cl_particles_oldvortexbeam && (getstati(STAT_ALLOW_OLDVORTEXBEAM) || isdemo()))
18                 WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum("TE_TEI_G3"), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
19         else
20                 WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum("nex_beam"), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
21 }