set sv_damageeffect_tick 0.05 "how often the damage effect is updated (particles per second), low values might cause lag"
set sv_damageeffect_lifetime 0.1 "how much a damage effect lasts, multiplied by damage amount"
+set cl_damageeffect 1 "enable weapon damage effects on players"
set g_respawn_ghosts 1 "if 1 dead bodies become ghosts and float away when the player respawns"
set g_respawn_ghosts_speed 5 "the speed with which respawn ghosts float and rotate"
float autocvar_crosshair_color_by_health;
float autocvar_cl_hitsound;
float autocvar_cl_hitsound_antispam_time;
+float autocvar_cl_damageeffect;
org_y = ReadCoord();
org_z = ReadCoord();
+ if not(autocvar_cl_damageeffect)
+ return;
if(autocvar_cl_gentle || autocvar_cl_gentle_damage)
return;
void Violence_DamageEffect_SetRepeat(entity pl, float damage, float type)
{
- // return if gentle mode is enabled or the damage was not caused by a weapon
- if(sv_gentle || !type)
- return;
if not(autocvar_sv_damageeffect_tick && autocvar_sv_damageeffect_lifetime)
return;
+ if(sv_gentle || !type)
+ return; // return if gentle mode is enabled or the damage was not caused by a weapon
// if a repeater doesn't exist, spawn one, else update the existing one
if(pl.damageeffect_repeater == world)