REGISTER_NET_LINKED(ENT_CLIENT_DAMAGEINFO)
#ifdef SVQC
bool Damage_DamageInfo_SendEntity(entity this, entity to, int sf)
{
REGISTER_NET_LINKED(ENT_CLIENT_DAMAGEINFO)
#ifdef SVQC
bool Damage_DamageInfo_SendEntity(entity this, entity to, int sf)
{
WriteHeader(MSG_ENTITY, ENT_CLIENT_DAMAGEINFO);
WriteShort(MSG_ENTITY, this.projectiledeathtype);
WriteHeader(MSG_ENTITY, ENT_CLIENT_DAMAGEINFO);
WriteShort(MSG_ENTITY, this.projectiledeathtype);
- WriteCoord(MSG_ENTITY, floor(this.origin.x));
- WriteCoord(MSG_ENTITY, floor(this.origin.y));
- WriteCoord(MSG_ENTITY, floor(this.origin.z));
+ WriteVector(MSG_ENTITY, org);
WriteByte(MSG_ENTITY, bound(1, this.dmg, 255));
WriteByte(MSG_ENTITY, bound(0, this.dmg_radius, 255));
WriteByte(MSG_ENTITY, bound(1, this.dmg_edge, 255));
WriteByte(MSG_ENTITY, bound(1, this.dmg, 255));
WriteByte(MSG_ENTITY, bound(0, this.dmg_radius, 255));
WriteByte(MSG_ENTITY, bound(1, this.dmg_edge, 255));
return; // if we aren't using a third person camera, hide our own effects
// now generate the particles
return; // if we aren't using a third person camera, hide our own effects
// now generate the particles
__pointparticles(this.team, org, '0 0 0', 1);
}
__pointparticles(this.team, org, '0 0 0', 1);
}
life = bound(autocvar_cl_damageeffect_lifetime_min, thedamage * autocvar_cl_damageeffect_lifetime, autocvar_cl_damageeffect_lifetime_max);
life = bound(autocvar_cl_damageeffect_lifetime_min, thedamage * autocvar_cl_damageeffect_lifetime, autocvar_cl_damageeffect_lifetime_max);
- effectname = DEATH_WEAPONOF(type).netname;
-
- if(substring(effectname, strlen(effectname) - 5, 5) == "BLOOD")
+ wep = DEATH_WEAPONOF(type);
+ effectname = strcat("damage_", wep.netname);
+ if((wep.spawnflags & WEP_FLAG_BLEED))
- specstr = species_prefix(specnum);
- specstr = substring(specstr, 0, strlen(specstr) - 1);
- effectname = strreplace("BLOOD", specstr, effectname);
+ string specstr = species_prefix(specnum);
+ effectname = strcat(specstr, effectname);
float thedamage, rad, edge, thisdmg;
bool hitplayer = false;
int species, forcemul;
float thedamage, rad, edge, thisdmg;
bool hitplayer = false;
int species, forcemul;
DamageEffect(it, w_org, thisdmg, w_deathtype, species);
DamageEffect(it, w_org, thisdmg, w_deathtype, species);
w_random = prandom();
traceline(w_org - normalize(force) * 16, w_org + normalize(force) * 16, MOVE_NOMONSTERS, NULL);
w_random = prandom();
traceline(w_org - normalize(force) * 16, w_org + normalize(force) * 16, MOVE_NOMONSTERS, NULL);