]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix damage text printing console errors in case of environmental damage without a...
authorterencehill <piuntn@gmail.com>
Wed, 12 Jun 2024 12:53:30 +0000 (14:53 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 12 Jun 2024 12:53:30 +0000 (14:53 +0200)
qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc

index b49cddd96012b6acb97077c5e84b9e2c3f0ed63a..9b596e922bc293c6e876b1b668bc84cbab731335 100644 (file)
@@ -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);