]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc
CA: fix scoring bug where players with negative scores have one point more
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / clanarena / sv_clanarena.qc
index 1b8f68e7ea83fe6d8a671cd0097c73b8e0297512..9775619f51c7ccc1a4ef615e576ade91b56b9316 100644 (file)
@@ -411,7 +411,7 @@ MUTATOR_HOOKFUNCTION(ca, PlayerDamage_SplitHealthArmor)
        if (scorer)
        {
                scorer.ca_damage_counter += scorer_damage;
-               if (fabs(scorer.ca_damage_counter) < autocvar_g_ca_damage2score)
+               if (scorer.ca_damage_counter >= 0 && scorer.ca_damage_counter < autocvar_g_ca_damage2score)
                        return;
                // NOTE: here we are actually rounding since ca_damage_counter is
                // initialized on player spawn to half autocvar_g_ca_damage2score