]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Hide missing_team notification if there's nobody playing, it's pointless
authorterencehill <piuntn@gmail.com>
Tue, 25 Feb 2014 16:09:53 +0000 (17:09 +0100)
committerterencehill <piuntn@gmail.com>
Tue, 25 Feb 2014 16:09:53 +0000 (17:09 +0100)
qcsrc/server/mutators/gamemode_ca.qc
qcsrc/server/mutators/gamemode_freezetag.qc

index 093c17c2aba0ff8a38333feec6464e327c1b9782..cf5dde111a74f797324ad0e407aa900f6d1e2301 100644 (file)
@@ -118,6 +118,13 @@ float CA_CheckTeams()
                prev_missing_teams_mask = -1;
                return 1;
        }
+       if(total_players == 0)
+       {
+               if(prev_missing_teams_mask > 0)
+                       Kill_Notification(NOTIF_ALL, world, MSG_CENTER_CPID, CPID_MISSING_TEAMS);
+               prev_missing_teams_mask = -1;
+               return 0;
+       }
        float missing_teams_mask = (!redalive) + (!bluealive) * 2;
        if(ca_teams >= 3) missing_teams_mask += (!yellowalive) * 4;
        if(ca_teams >= 4) missing_teams_mask += (!pinkalive) * 8;
index 16dad4cbacdad17667502c08965d8eb814f0f98e..d6b5372881023f06f51004fd6e6a52a9af7c5831 100644 (file)
@@ -52,6 +52,13 @@ float freezetag_CheckTeams()
                prev_missing_teams_mask = -1;
                return 1;
        }
+       if(total_players == 0)
+       {
+               if(prev_missing_teams_mask > 0)
+                       Kill_Notification(NOTIF_ALL, world, MSG_CENTER_CPID, CPID_MISSING_TEAMS);
+               prev_missing_teams_mask = -1;
+               return 0;
+       }
        float missing_teams_mask = (!redalive) + (!bluealive) * 2;
        if(freezetag_teams >= 3) missing_teams_mask += (!yellowalive) * 4;
        if(freezetag_teams >= 4) missing_teams_mask += (!pinkalive) * 8;