From: z411 Date: Thu, 28 Nov 2024 03:41:36 +0000 (+0000) Subject: CA: Floor health and armor in PreventStalemate X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0d9abd79bcc56a1367a2a76fc76ef7971154cce2;p=xonotic%2Fxonotic-data.pk3dir.git CA: Floor health and armor in PreventStalemate --- diff --git a/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc b/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc index dcdc11414..faa8a323c 100644 --- a/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc +++ b/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc @@ -104,9 +104,12 @@ int CA_PreventStalemate() { if (IS_DEAD(it)) continue; - teamHealth += GetResource(it, RES_HEALTH) + GetResource(it, RES_ARMOR); + teamHealth += floor(GetResource(it, RES_HEALTH)) + floor(GetResource(it, RES_ARMOR)); }); + // Round the resulting team health just in case + teamHealth = rint(teamHealth); + // Set the winner teams if(!winnerTeam || teamHealth > winnerTeamHealth) {