From 73a69d6dfe45a30c4fe274eae18198fe4629216d Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 21 Feb 2019 18:30:15 +0100 Subject: [PATCH] Don't even try to count damage as score if it's null --- qcsrc/server/player.qc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/qcsrc/server/player.qc b/qcsrc/server/player.qc index f52cb75bb..b8d3c903c 100644 --- a/qcsrc/server/player.qc +++ b/qcsrc/server/player.qc @@ -467,8 +467,9 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage, this.v_angle_x = bound(-90, this.v_angle.x, 90); } - if (this != attacker) { - float realdmg = damage - excess; + float realdmg = damage - excess; + if (this != attacker && realdmg) + { if (IS_PLAYER(attacker) && DIFF_TEAM(attacker, this)) { GameRules_scoring_add(attacker, DMG, realdmg); } @@ -552,7 +553,7 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage, // print an obituary message if(this.classname != "body") - Obituary (attacker, inflictor, this, deathtype, weaponentity); + Obituary(attacker, inflictor, this, deathtype, weaponentity); // increment frag counter for used weapon type Weapon w = DEATH_WEAPONOF(deathtype); -- 2.39.2