From: z411 Date: Thu, 29 Sep 2022 01:55:58 +0000 (-0300) Subject: Added logging to preventStalemate X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d37bb6ef9fa25aad9be231e0dd6ba8d9cb14fcef;p=xonotic%2Fxonotic-data.pk3dir.git Added logging to preventStalemate --- diff --git a/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc b/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc index 00540060f..91fbc3caa 100644 --- a/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc +++ b/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc @@ -47,6 +47,7 @@ void nades_Clear(entity player); int CA_PreventStalemate() { + //LOG_INFO("PreventStalemate running"); int winnerTeam = 0; int secondTeam = 0; @@ -67,9 +68,15 @@ int CA_PreventStalemate() } if(Team_GetNumberOfAlivePlayers(Team_GetTeam(winnerTeam)) != Team_GetNumberOfAlivePlayers(Team_GetTeam(secondTeam))) + { + LOG_INFOF("Stalemate broken by alive players. Best team: %s%s (%d)^7 - Trailing team: %s%s (%d)", + Team_ColorCode(winnerTeam), Team_ColorName(winnerTeam), Team_GetNumberOfAlivePlayers(Team_GetTeam(winnerTeam)), + Team_ColorCode(secondTeam), Team_ColorName(secondTeam), Team_GetNumberOfAlivePlayers(Team_GetTeam(secondTeam))); return winnerTeam; + } // Equality. Let's check which team has more health now + //LOG_INFO("Equality. Checking health now."); winnerTeam = 0; secondTeam = 0; int winnerTeamHealth = 0; @@ -108,7 +115,12 @@ int CA_PreventStalemate() } if(winnerTeamHealth != secondTeamHealth) + { + LOG_INFOF("Stalemate broken by team health. Best team: %s%s (%d)^7 - Trailing team: %s%s (%d)", + Team_ColorCode(winnerTeam), Team_ColorName(winnerTeam), winnerTeamHealth, + Team_ColorCode(secondTeam), Team_ColorName(secondTeam), secondTeamHealth); return winnerTeam; + } else return -2; // Equality. Can't avoid the stalemate. }