]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't even try to count damage as score if it's null
authorterencehill <piuntn@gmail.com>
Thu, 21 Feb 2019 17:30:15 +0000 (18:30 +0100)
committerterencehill <piuntn@gmail.com>
Thu, 21 Feb 2019 17:39:41 +0000 (18:39 +0100)
qcsrc/server/player.qc

index f52cb75bb007c1ba62bbeb8b689d40c5b39b9a2c..b8d3c903c541cab860c1f596bf118037d534d017 100644 (file)
@@ -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);