From: terencehill Date: Wed, 12 Jun 2024 12:53:30 +0000 (+0200) Subject: Fix damage text printing console errors in case of environmental damage without a... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=05327cb2cbc7a803feee63c2bb4fb584fa3ee922;p=xonotic%2Fxonotic-data.pk3dir.git Fix damage text printing console errors in case of environmental damage without a player taking the credit --- 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);