]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/client/particles.qc
Require semicolon or definition following `METHOD`
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / particles.qc
1 #include "particles.qh"
2 #include "_all.qh"
3
4 #include "../common/stats.qh"
5 #include "../common/util.qh"
6
7 #include "../warpzonelib/common.qh"
8
9 void Net_ReadVortexBeamParticle()
10 {
11         vector shotorg, endpos;
12         float charge;
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;
16
17         pointparticles(particleeffectnum("nex_muzzleflash"), shotorg, normalize(endpos - shotorg) * 1000, 1);
18
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;
22
23         if (autocvar_cl_particles_oldvortexbeam && (getstati(STAT_ALLOW_OLDVORTEXBEAM) || isdemo()))
24                 WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum("TE_TEI_G3"), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
25         else
26                 WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum("nex_beam"), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
27 }