X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fparticles.qc;h=f16519ab5c71dbcc7e726ef26c4342e90c3330de;hb=cc6d7ca1096f7ed230b7f06f77fb4c8a530a7018;hp=ce8b6dd7f9ecbe612a0aeb52d87650633d6228e7;hpb=b56d8435ab6710d101761c6c2b9746e38e3cc813;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/particles.qc b/qcsrc/client/particles.qc index ce8b6dd7f..f16519ab5 100644 --- a/qcsrc/client/particles.qc +++ b/qcsrc/client/particles.qc @@ -225,65 +225,7 @@ void Ent_RainOrSnow() self.draw = Draw_Snow; } -entity zcurve; -void zcurveparticles(float effectnum, vector start, vector end, float end_dz, float speed, float depth) -{ - // end_dz: - // IF IT WERE A STRAIGHT LINE, it'd end end_dz above end - - vector mid; - mid = (start + end) * 0.5; - - end_dz *= 0.25; - mid_z += end_dz; - - --depth; - if(depth < 0 || normalize(mid - start) * normalize(end - start) > 0.999999) - // TODO make this a variable threshold - // currently: 0.081 degrees - // 0.99999 would be 0.256 degrees and is visible - { - zcurve.velocity = speed * normalize(end - start); - trailparticles(zcurve, effectnum, start, end); - } - else - { - zcurveparticles(effectnum, start, mid, end_dz, speed, depth); - zcurveparticles(effectnum, mid, end, end_dz, speed, depth); - } -} - -void Net_ReadZCurveParticles() -{ - vector start, end; - float end_dz; - float effectnum, speed; - - if(!zcurve) - { - zcurve = spawn(); - zcurve.classname = "zcurve"; - } - - effectnum = ReadShort(); - - start_x = ReadCoord(); - start_y = ReadCoord(); - start_z = ReadCoord(); - - do - { - end_x = ReadCoord(); - end_y = ReadCoord(); - end_z = ReadCoord(); - end_dz = ReadCoord(); - speed = ReadShort(); - zcurveparticles(effectnum, start, end, end_dz, 16 * (speed & 0x7FFF), 5); // at most 32 segments - } - while(!(speed & 0x8000)); -} - -void Net_ReadNexgunBeamParticle() +void Net_ReadVortexBeamParticle() { vector shotorg, endpos; float charge; @@ -297,7 +239,7 @@ void Net_ReadNexgunBeamParticle() charge = sqrt(charge); // divide evenly among trail spacing and alpha particles_alphamin = particles_alphamax = particles_fade = charge; - if (autocvar_cl_particles_oldnexbeam && (getstati(STAT_ALLOW_OLDNEXBEAM) || isdemo())) + if (autocvar_cl_particles_oldvortexbeam && (getstati(STAT_ALLOW_OLDVORTEXBEAM) || isdemo())) WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum("TE_TEI_G3"), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE); else WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum("nex_beam"), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);