X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fparticles.qc;h=b33b81a018ca982638304afd5edcc3e5adf753d3;hb=a221addae650229531ec0816248f1e8344039d33;hp=d4a95b7754cddc37b6522ffa80d0930c2081d4f1;hpb=e2fa5a6fc3e04ef71f32fd6a55b14d3ac1cd1aa0;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/particles.qc b/qcsrc/client/particles.qc index d4a95b775..b33b81a01 100644 --- a/qcsrc/client/particles.qc +++ b/qcsrc/client/particles.qc @@ -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 - if (cvar("cl_particles_oldnexbeam") && (getstati(STAT_ALLOW_OLDNEXBEAM) || isdemo())) - WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3"), shotorg, endpos); + charge = sqrt(charge); // divide evenly among trail spacing and alpha + particles_alphamin = particles_alphamax = charge; + if (autocvar_cl_particles_oldnexbeam && (getstati(STAT_ALLOW_OLDNEXBEAM) || isdemo())) + 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); }