// if the player already has a damage effect, replace it with the new one
entity head;
- for(head = world; (head = find(head, classname, "dmgent")); )
+ for(head = world; (head = find(head, classname, "damageeffect")); )
{
if(head.team == entnumber - 1)
{
entity e;
e = spawn();
- e.classname = "dmgent";
+ e.classname = "damageeffect";
e.team = entnumber - 1;
e.dmgpartnum = particleeffectnum(effectnum);
e.think = Ent_DamageEffect_Think;
.float cvar_cl_voice_directional;
.float cvar_cl_voice_directional_taunt_attenuation;
-.float cvar_cl_damageeffect;
-
.float version_mismatch;
float independent_players;
float Violence_DamageEffect_SendEntity(entity to, float sf)
{
- if not(to.cvar_cl_damageeffect)
- return FALSE; // if the client doesn't have the effect enabled, don't send to him and waste bandwidth
-
WriteByte(MSG_ENTITY, ENT_CLIENT_DAMAGEEFFECT);
WriteByte(MSG_ENTITY, self.cnt); // damage amount
WriteByte(MSG_ENTITY, self.weapon); // damage weapon
GetCvars_handleString_Fixup(s, f, cvar_cl_weaponpriorities[9], "cl_weaponpriority9", W_FixWeaponOrder_AllowIncomplete);
GetCvars_handleFloat(s, f, cvar_cl_weaponimpulsemode, "cl_weaponimpulsemode");
GetCvars_handleFloat(s, f, cvar_cl_autotaunt, "cl_autotaunt");
- GetCvars_handleFloat(s, f, cvar_cl_damageeffect, "cl_damageeffect");
GetCvars_handleFloat(s, f, cvar_cl_noantilag, "cl_noantilag");
GetCvars_handleFloat(s, f, cvar_cl_voice_directional, "cl_voice_directional");
GetCvars_handleFloat(s, f, cvar_cl_voice_directional_taunt_attenuation, "cl_voice_directional_taunt_attenuation");