From 05327cb2cbc7a803feee63c2bb4fb584fa3ee922 Mon Sep 17 00:00:00 2001 From: terencehill Date: Wed, 12 Jun 2024 14:53:30 +0200 Subject: [PATCH] Fix damage text printing console errors in case of environmental damage without a player taking the credit --- qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc b/qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc index b49cddd96..9b596e922 100644 --- a/qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc +++ b/qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc @@ -97,7 +97,7 @@ MUTATOR_HOOKFUNCTION(damagetext, PlayerDamaged) { net_text_prev.dent_net_potential = potential_damage; return; } - else if (!IL_CONTAINS(hit.dent_attackers, attacker)) + else if (attacker && !IL_CONTAINS(hit.dent_attackers, attacker)) { // player is hit for the first time after respawn by this attacker IL_PUSH(hit.dent_attackers, attacker); -- 2.39.2