From 0d9abd79bcc56a1367a2a76fc76ef7971154cce2 Mon Sep 17 00:00:00 2001 From: z411 Date: Thu, 28 Nov 2024 03:41:36 +0000 Subject: [PATCH] CA: Floor health and armor in PreventStalemate --- qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) { -- 2.39.2