-
-void Ent_DamageEffect()
-{
- float type, specnum1, specnum2;
- vector org;
- string specstr, effectnum;
- entity e;
-
- type = ReadByte(); // damage weapon
- specnum1 = ReadByte(); // player species
- org_x = ReadCoord();
- org_y = ReadCoord();
- org_z = ReadCoord();
-
- if(autocvar_cl_gentle || autocvar_cl_gentle_damage)
- return;
-
- e = get_weaponinfo(type);
-
- specnum2 = (specnum1 & 0x78) / 8; // blood type: using four bits (0..7, bit indexes 3,4,5)
- specstr = species_prefix(specnum2);
-
- effectnum = strcat("weapondamage_", e.netname);
- // If the weapon is a bullet weapon, its damage effect is blood.
- // Since blood is species dependent, we make this effect per-species.
- if(type == WEP_SHOTGUN || type == WEP_UZI || type == WEP_SNIPERRIFLE)
- if(specstr != "")
- {
- effectnum = strcat(effectnum, "_", specstr);
- effectnum = substring(effectnum, 0, strlen(effectnum) - 1); // remove the _ symbol at the end of the species name
- }
-
- pointparticles(particleeffectnum(effectnum), org, '0 0 0', 1);
-}