set g_teleport_maxspeed 0 "maximum speed that a player can keep when going through a teleporter (if a misc_teleporter_dest also has a cap the smallest one of these will be used), 0 = don't limit, -1 = keep no speed"
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 3 "how much a damage effect lasts"
+set sv_damageeffect_lifetime 0.1 "how much a damage effect lasts, multiplied by damage amount"
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"
{
// if the target is a player or dead body, activate damage effects
if(targ.classname == "player" || targ.classname == "body")
- Violence_DamageEffect_SetRepeat(targ, DEATH_WEAPONOF(deathtype));
+ Violence_DamageEffect_SetRepeat(targ, damage, DEATH_WEAPONOF(deathtype));
float mirrordamage;
float mirrorforce;
self.nextthink = time + autocvar_sv_damageeffect_tick;
}
-void Violence_DamageEffect_SetRepeat(entity pl, float type)
+void Violence_DamageEffect_SetRepeat(entity pl, float damage, float type)
{
if(sv_gentle)
return;
repeater.owner = pl;
repeater.origin = pl.origin;
repeater.cnt = type;
- repeater.lifetime = time + autocvar_sv_damageeffect_lifetime;
+ repeater.lifetime = time + (autocvar_sv_damageeffect_lifetime * damage);
repeater.think = Violence_DamageEffect_DoRepeat;
repeater.nextthink = time;