From: terencehill Date: Tue, 15 Feb 2022 13:44:52 +0000 (+0100) Subject: CA: fix scoring bug where players with negative scores have one point more X-Git-Tag: xonotic-v0.8.5~201 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a0929b0da6556028ba9203f2e6c1a8d73924f152;p=xonotic%2Fxonotic-data.pk3dir.git CA: fix scoring bug where players with negative scores have one point more --- diff --git a/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc b/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc index 1b8f68e7e..9775619f5 100644 --- a/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc +++ b/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc @@ -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