WriteShort(channel, floor(this.origin.x / 4)); // not using a coord here, as gibs don't need this accuracy
WriteShort(channel, floor(this.origin.y / 4)); // not using a coord here, as gibs don't need this accuracy
WriteShort(channel, floor(this.origin.z / 4)); // not using a coord here, as gibs don't need this accuracy
WriteShort(channel, floor(this.origin.x / 4)); // not using a coord here, as gibs don't need this accuracy
WriteShort(channel, floor(this.origin.y / 4)); // not using a coord here, as gibs don't need this accuracy
WriteShort(channel, floor(this.origin.z / 4)); // not using a coord here, as gibs don't need this accuracy
e.oldorigin_x = compressShortVector(e.velocity);
FOREACH_CLIENT(IS_REAL_CLIENT(it), Violence_GibSplash_SendEntity(e, it, 0));
e.oldorigin_x = compressShortVector(e.velocity);
FOREACH_CLIENT(IS_REAL_CLIENT(it), Violence_GibSplash_SendEntity(e, it, 0));
}
void Violence_GibSplash(entity source, float type, float amount, entity attacker)
}
void Violence_GibSplash(entity source, float type, float amount, entity attacker)
__pointparticles(ef, org, randomvec() * explosionspeed, howmany / 50);
}
__pointparticles(ef, org, randomvec() * explosionspeed, howmany / 50);
}
// TODO maybe bounce of walls, make more gibs, etc.
if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
{
// TODO maybe bounce of walls, make more gibs, etc.
if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
{
- if(!self.silent)
- sound(self, CH_PAIN, SND_GIB_SPLAT_RANDOM(), VOL_BASE, ATTEN_NORM);
- __pointparticles(_particleeffectnum(strcat(species_prefix(self.cnt), "blood")), self.origin + '0 0 1', '0 0 30', 10);
+ if(!this.silent)
+ sound(this, CH_PAIN, SND_GIB_SPLAT_RANDOM(), VOL_BASE, ATTEN_NORM);
+ __pointparticles(_particleeffectnum(strcat(species_prefix(this.cnt), "blood")), this.origin + '0 0 1', '0 0 30', 10);
// TODO somehow make it spray in a direction dependent on this.angles
__trailparticles(this, _particleeffectnum(strcat(species_prefix(this.cnt), EFFECT_TR_SLIGHTBLOOD.eent_eff_name)), oldorg, this.origin);
else
// TODO somehow make it spray in a direction dependent on this.angles
__trailparticles(this, _particleeffectnum(strcat(species_prefix(this.cnt), EFFECT_TR_SLIGHTBLOOD.eent_eff_name)), oldorg, this.origin);
else
- gib.move_velocity = vconst * autocvar_cl_gibs_velocity_scale + vrand * autocvar_cl_gibs_velocity_random + '0 0 1' * autocvar_cl_gibs_velocity_up;
- gib.move_avelocity = prandomvec() * vlen(gib.move_velocity) * autocvar_cl_gibs_avelocity_scale;
+ gib.velocity = vconst * autocvar_cl_gibs_velocity_scale + vrand * autocvar_cl_gibs_velocity_random + '0 0 1' * autocvar_cl_gibs_velocity_up;
+ gib.avelocity = prandomvec() * vlen(gib.velocity) * autocvar_cl_gibs_avelocity_scale;