]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Perfect and Defense medals don't make sense in less than 3v3 CA
authorz411 <z411@omaera.org>
Sat, 21 Nov 2020 23:37:36 +0000 (20:37 -0300)
committerz411 <z411@omaera.org>
Sat, 21 Nov 2020 23:37:36 +0000 (20:37 -0300)
qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc

index cb7af17ddbc1f2d397b80a1c9b704c70cec5f107..d5ec7521d528f2b4a50d59c890d5f6052383a5cf 100644 (file)
@@ -112,7 +112,7 @@ float CA_CheckWinner()
        if(winner_team > 0)
        {
                entity last_pl = ca_LastPlayer(winner_team);
-               if(last_pl) {
+               if(last_pl && Team_GetNumberOfPlayers(tm) >= 3) {
                        Give_Medal(last_pl, DEFENSE);
                }
                
@@ -123,7 +123,9 @@ float CA_CheckWinner()
                
                entity tm = Team_GetTeam(winner_team);
                
-               if(Team_GetNumberOfAlivePlayers(tm) == Team_GetNumberOfPlayers(tm)) perfect = true;
+               if (Team_GetNumberOfPlayers(tm) >= 3 &&
+                       Team_GetNumberOfAlivePlayers(tm) == Team_GetNumberOfPlayers(tm))
+                               perfect = true;
        }
        else if(winner_team == -1)
        {