Merge branch 'master' into mirceakitsune/damage_effects
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_damage.qc
index d6020bd349a8b7bf6955b838d5f094da1b80d7db..efdd9ed1cf921806917a107368a78058fe3b7b41 100644 (file)
@@ -493,6 +493,10 @@ entity damage_attacker;
 
 void Damage (entity targ, entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
 {
+       // if the target is a player or dead body, activate damage effects
+       if(targ.classname == "player" || targ.classname == "body")
+               Violence_DamageEffect_SetRepeat(targ, damage, DEATH_WEAPONOF(deathtype));
+
        float mirrordamage;
        float mirrorforce;
        float teamdamage0;