Make easier to read code that sets domination_teams
authorterencehill <piuntn@gmail.com>
Fri, 18 Nov 2016 20:33:13 +0000 (21:33 +0100)
committerterencehill <piuntn@gmail.com>
Fri, 18 Nov 2016 20:33:13 +0000 (21:33 +0100)
qcsrc/server/mutators/mutator/gamemode_domination.qc

index eb94e4f..7f98ed2 100644 (file)
@@ -631,7 +631,10 @@ void dom_DelayedInit(entity this) // Do this check with a delay so we can wait f
        if(find(NULL, classname, "dom_team") == NULL || autocvar_g_domination_teams_override >= 2)
        {
                LOG_TRACE("No \"dom_team\" entities found on this map, creating them anyway.");
-               domination_teams = bound(2, ((autocvar_g_domination_teams_override < 2) ? autocvar_g_domination_default_teams : autocvar_g_domination_teams_override), 4);
+               domination_teams = autocvar_g_domination_teams_override;
+               if (domination_teams < 2)
+                       domination_teams = autocvar_g_domination_default_teams;
+               domination_teams = bound(2, domination_teams, 4);
                dom_spawnteams(domination_teams);
        }