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 sv_damageeffect_lifetime_max 8 "maximum amount of lifetime a damage effect may have at a time"
set cl_damageeffect 1 "enable weapon damage effects on players"
set cl_damageeffect_gib_probability 0.15 "probability of effect showing on gibs each tick (used to reduce the effect on gibs)"
float autocvar_sv_gibhealth;
float autocvar_sv_damageeffect_tick;
float autocvar_sv_damageeffect_lifetime;
+float autocvar_sv_damageeffect_lifetime_max;
float autocvar_sys_ticrate;
float autocvar_teamplay_lockonrestart;
float autocvar_teamplay_mode;
pl.damageeffect_repeater.lifetime += (autocvar_sv_damageeffect_lifetime * damage);
}
+ pl.damageeffect_repeater.lifetime = bound(0, pl.damageeffect_repeater.lifetime, time + autocvar_sv_damageeffect_lifetime_max);
+
pl.damageeffect_repeater.cnt = type;
pl.damageeffect_repeater.nextthink = time;
}