]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/particles.qc
#include this
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / particles.qc
index 8751cc0c5535c107d2e4de8b43d2f033c232e408..062c9687096c3ede137dea160b2abc9eb732273d 100644 (file)
@@ -1,10 +1,25 @@
-.float dphitcontentsmask;
+#if defined(CSQC)
+       #include "../dpdefs/csprogsdefs.qc"
+       #include "../common/constants.qh"
+       #include "../common/stats.qh"
+       #include "../warpzonelib/common.qh"
+       #include "../common/util.qh"
+       #include "../common/weapons/weapons.qh"
+       #include "autocvars.qh"
+       #include "bgmscript.qh"
+       #include "main.qh"
+       #include "../csqcmodellib/cl_model.qh"
+#elif defined(MENUQC)
+#elif defined(SVQC)
+#endif
 
-.float cnt; // effect number
+.int dphitcontentsmask;
+
+.int cnt; // effect number
 .vector velocity; // particle velocity
 .float waterlevel; // direction jitter
-.float count; // count multiplier
-.float impulse; // density
+.int count; // count multiplier
+.int impulse; // density
 .string noise; // sound
 .float atten;
 .float volume;
@@ -40,9 +55,9 @@ void Draw_PointParticles()
        for(i = random(); i <= n && fail <= 64*n; ++i)
        {
                p = o + self.mins;
-               p_x += random() * sz_x;
-               p_y += random() * sz_y;
-               p_z += random() * sz_z;
+               p.x += random() * sz.x;
+               p.y += random() * sz.y;
+               p.z += random() * sz.z;
                if(WarpZoneLib_BoxTouchesBrush(p, p, self, world))
                {
                        if(self.movedir != '0 0 0')
@@ -83,9 +98,9 @@ void Ent_PointParticles_Remove()
 
 void Ent_PointParticles()
 {
-       float f, i;
+       float i;
        vector v;
-       f = ReadByte();
+       int f = ReadByte();
        if(f & 2)
        {
                i = ReadCoord(); // density (<0: point, >0: volume)
@@ -174,7 +189,7 @@ void Ent_PointParticles()
                if(!self.absolute)
                {
                        v = self.maxs - self.mins;
-                       self.impulse *= -v_x * v_y * v_z / 262144; // relative: particles per 64^3 cube
+                       self.impulse *= -v.x * v.y * v.z / 262144; // relative: particles per 64^3 cube
                }
        }
 
@@ -225,7 +240,7 @@ void Ent_RainOrSnow()
                self.draw = Draw_Snow;
 }
 
-void Net_ReadNexgunBeamParticle()
+void Net_ReadVortexBeamParticle()
 {
        vector shotorg, endpos;
        float charge;
@@ -239,7 +254,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);