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.04 "how much a damage effect lasts, multiplied by damage amount"
set sv_damageeffect_lifetime_max 5 "maximum amount of lifetime a damage effect may have at a time"
-set cl_damageeffect 1 "enable weapon damage effects on players, value specifies particle count offset"
-set cl_damageeffect_gib_probability 0.15 "probability of effect showing on gibs each tick (used to reduce the effect on gibs)"
+set cl_damageeffect 1 "enable weapon damage effects on players, values between 0 and 1 specify probability of the effect showing on players each tick (used to reduce the effect)"
+set cl_damageeffect_gibs 0.15 "probability of the effect showing on gibs each tick (used to reduce the effect)"
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_cl_hitsound;
float autocvar_cl_hitsound_antispam_time;
float autocvar_cl_damageeffect;
-float autocvar_cl_damageeffect_gib_probability;
+float autocvar_cl_damageeffect_gibs;
for(head = world; (head = find(head, classname, "gib")); )
{
if(head.team == entnumber)
- if(random() < autocvar_cl_damageeffect_gib_probability)
- pointparticles(particleeffectnum(effectnum), head.origin, '0 0 0', autocvar_cl_damageeffect);
+ if(random() < autocvar_cl_damageeffect_gibs)
+ pointparticles(particleeffectnum(effectnum), head.origin, '0 0 0', 1);
}
// Now apply the effect to the player. This shouldn't be done on gibbed bodies, but there's no way
// to tell between them and the respawned player, if both have damage effects at the same time.
- pointparticles(particleeffectnum(effectnum), org, '0 0 0', autocvar_cl_damageeffect);
+ if(random() < autocvar_cl_damageeffect)
+ pointparticles(particleeffectnum(effectnum), org, '0 0 0', 1);
}