]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_world.qc
Merge branch 'master' into Mario/ons_updates
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_world.qc
index 0a2708340dd007993e0e4f409615a3748c14276a..cc28f032fdceff893bbc0b2a06d199ad9ee4aa4a 100644 (file)
@@ -1664,48 +1664,6 @@ void ClearWinners(void)
                head.winning = 0;
 }
 
-// Onslaught winning condition:
-// game terminates if only one team has a working generator (or none)
-float WinningCondition_Onslaught()
-{
-       entity head;
-       float t1, t2, t3, t4;
-
-       WinningConditionHelper(); // set worldstatus
-
-       if(warmup_stage)
-               return WINNING_NO;
-
-       // first check if the game has ended
-       t1 = t2 = t3 = t4 = 0;
-       head = find(world, classname, "onslaught_generator");
-       while (head)
-       {
-               if (head.health > 0)
-               {
-                       if (head.team == NUM_TEAM_1) t1 = 1;
-                       if (head.team == NUM_TEAM_2) t2 = 1;
-                       if (head.team == NUM_TEAM_3) t3 = 1;
-                       if (head.team == NUM_TEAM_4) t4 = 1;
-               }
-               head = find(head, classname, "onslaught_generator");
-       }
-       if (t1 + t2 + t3 + t4 < 2)
-       {
-               // game over, only one team remains (or none)
-               ClearWinners();
-               if (t1) SetWinners(team, NUM_TEAM_1);
-               if (t2) SetWinners(team, NUM_TEAM_2);
-               if (t3) SetWinners(team, NUM_TEAM_3);
-               if (t4) SetWinners(team, NUM_TEAM_4);
-               dprint("Have a winner, ending game.\n");
-               return WINNING_YES;
-       }
-
-       // Two or more teams remain
-       return WINNING_NO;
-}
-
 // Assault winning condition: If the attackers triggered a round end (by fulfilling all objectives)
 // they win. Otherwise the defending team wins once the timelimit passes.
 void assault_new_round();
@@ -2075,9 +2033,6 @@ void CheckRules_World()
                return;
        }
 
-       if(g_onslaught)
-               timelimit = 0; // ONS has its own overtime rule
-
        float wantovertime;
        wantovertime = 0;
 
@@ -2163,10 +2118,6 @@ void CheckRules_World()
        {
                checkrules_status = WinningCondition_LMS();
        }
-       else if (g_onslaught)
-       {
-               checkrules_status = WinningCondition_Onslaught(); // TODO remove this?
-       }
        else
        {
                checkrules_status = WinningCondition_Scores(fraglimit, leadlimit);