vec3_t origin_from, origin_to, dir_from, dir_to;
float count;
int flags;
- float tintmins[4], tintmaxs[4];
+ qboolean istrail;
+ float tintmins[4], tintmaxs[4], fade;
VM_SAFEPARMCOUNTRANGE(7, 8, VM_CL_boxparticles);
effectnum = (int)PRVM_G_FLOAT(OFS_PARM0);
+ if (effectnum < 0)
+ return;
// own = PRVM_G_EDICT(OFS_PARM1); // TODO find use for this
VectorCopy(PRVM_G_VECTOR(OFS_PARM2), origin_from);
VectorCopy(PRVM_G_VECTOR(OFS_PARM3), origin_to );
flags = PRVM_G_FLOAT(OFS_PARM7);
else
flags = 0;
+
Vector4Set(tintmins, 1, 1, 1, 1);
Vector4Set(tintmaxs, 1, 1, 1, 1);
+ fade = 1;
+ istrail = false;
+
if(flags & 1) // read alpha
{
tintmins[3] = PRVM_clientglobalfloat(particles_alphamin);
VectorCopy(PRVM_clientglobalvector(particles_colormin), tintmins);
VectorCopy(PRVM_clientglobalvector(particles_colormax), tintmaxs);
}
- if (effectnum < 0)
- return;
- CL_ParticleTrail(effectnum, count, origin_from, origin_to, dir_from, dir_to, NULL, 0, true, true, tintmins, tintmaxs);
+ if(flags & 4) // read fade
+ {
+ fade = PRVM_clientglobalfloat(particles_fade);
+ }
+ if(flags & 128) // draw as trail
+ {
+ istrail = true;
+ }
+
+ if (istrail)
+ CL_ParticleTrail(effectnum, count, origin_from, origin_to, dir_from, dir_to, NULL, 0, true, true, tintmins, tintmaxs, fade);
+ else
+ CL_ParticleBox(effectnum, count, origin_from, origin_to, dir_from, dir_to, NULL, 0, true, true, tintmins, tintmaxs, fade);
}
//#531 void(float pause) setpause