]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/mutator/gamemode_tdm.qc
New dynamic handicap algorithm.
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator / gamemode_tdm.qc
index 101f57fcc4d6efb96ecd5d2ed5157b0065c29060..aad31932884556dff7b4a7b6f1a186dcbf15e44c 100644 (file)
@@ -36,16 +36,9 @@ void tdm_DelayedInit(entity this)
                LOG_TRACE("No \"tdm_team\" entities found on this map, creating them anyway.");
 
                int numteams = autocvar_g_tdm_teams_override;
-
                if(numteams < 2) { numteams = autocvar_g_tdm_teams; }
-               numteams = bound(2, numteams, 4);
-
-               int teams = 0;
-               if(numteams >= 1) teams |= BIT(0);
-               if(numteams >= 2) teams |= BIT(1);
-               if(numteams >= 3) teams |= BIT(2);
-               if(numteams >= 4) teams |= BIT(3);
 
+               int teams = BITS(bound(2, numteams, 4));
                if(teams & BIT(0))
                        tdm_SpawnTeam("Red", NUM_TEAM_1);
                if(teams & BIT(1))