X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fparticles.qc;h=062c9687096c3ede137dea160b2abc9eb732273d;hb=ba0988ca930f50286f8cf3b6c114ebc6584964af;hp=f16519ab5c71dbcc7e726ef26c4342e90c3330de;hpb=0a92453278b65a165e83e64a989b5e7de38ccf02;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/particles.qc b/qcsrc/client/particles.qc index f16519ab5..062c96870 100644 --- a/qcsrc/client/particles.qc +++ b/qcsrc/client/particles.qc @@ -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 } }