GameRules_teams(true);
GameRules_limit_score(autocvar_g_nexball_goallimit);
GameRules_limit_lead(autocvar_g_nexball_goalleadlimit);
- have_team_spawns = -1; // request team spawns
}
MUTATOR_ONROLLBACK_OR_REMOVE
GameRules_teams(true);
GameRules_limit_score(autocvar_g_onslaught_point_limit);
- have_team_spawns = -1; // request team spawns
}
MUTATOR_ONROLLBACK_OR_REMOVE
serverflags |= SERVERFLAG_TEAMPLAY;
teamplay = 1;
cvar_set("teamplay", "2"); // DP needs this for sending proper getstatus replies.
+ GameRules_spawning_teams(true);
} else {
serverflags &= ~SERVERFLAG_TEAMPLAY;
teamplay = 0;
cvar_set("teamplay", "0"); // DP needs this for sending proper getstatus replies.
+ GameRules_spawning_teams(false);
}
}
+void GameRules_spawning_teams(bool value)
+{
+ have_team_spawns = value ? -1 : 0;
+}
+
bool _GameRules_score_enabled = true;
void GameRules_score_enabled(bool value)
{
// todo: accept the number of teams as a parameter
void GameRules_teams(bool value);
+/**
+ * Used to disable team spawns in team modes
+ */
+void GameRules_spawning_teams(bool value);
+
/**
* Disabling score disables the "score" column on the scoreboard
*/
REGISTER_MUTATOR(as, false)
{
GameRules_teams(true);
- have_team_spawns = -1; // request team spawns
MUTATOR_ONADD
{
GameRules_limit_score(autocvar_g_ca_point_limit);
GameRules_limit_lead(autocvar_g_ca_point_leadlimit);
- if (autocvar_g_ca_team_spawns)
- have_team_spawns = -1; // request team spawns
+ GameRules_spawning_teams(autocvar_g_ca_team_spawns);
}
MUTATOR_ONREMOVE
GameRules_teams(true);
GameRules_limit_score(autocvar_capturelimit_override);
GameRules_limit_lead(autocvar_captureleadlimit_override);
- have_team_spawns = -1; // request team spawns
}
MUTATOR_ONROLLBACK_OR_REMOVE
GameRules_teams(true);
GameRules_limit_score(fraglimit_override);
GameRules_limit_lead(autocvar_g_domination_point_leadlimit);
- have_team_spawns = -1; // request team spawns
}
MUTATOR_ONREMOVE
GameRules_limit_score(autocvar_g_freezetag_point_limit);
GameRules_limit_lead(autocvar_g_freezetag_point_leadlimit);
- if (autocvar_g_freezetag_team_spawns)
- have_team_spawns = -1; // request team spawns
+ GameRules_spawning_teams(autocvar_g_freezetag_team_spawns);
}
MUTATOR_ONROLLBACK_OR_REMOVE
if (autocvar_g_invasion_teams >= 2)
{
GameRules_teams(true);
- if (autocvar_g_invasion_team_spawns)
- have_team_spawns = -1; // request team spawns
+ GameRules_spawning_teams(autocvar_g_invasion_team_spawns);
}
}
GameRules_teams(true);
GameRules_limit_score(autocvar_g_keyhunt_point_limit);
GameRules_limit_lead(autocvar_g_keyhunt_point_leadlimit);
- if (autocvar_g_keyhunt_team_spawns)
- have_team_spawns = -1; // request team spawns
+ GameRules_spawning_teams(autocvar_g_keyhunt_team_spawns);
}
MUTATOR_ONROLLBACK_OR_REMOVE
if(race_teams >= 4) teams |= BIT(3);
race_teams = teams; // now set it?
-
- have_team_spawns = -1; // request team spawns
}
else
race_teams = 0;
GameRules_teams(true);
GameRules_limit_score(autocvar_g_tdm_point_limit);
GameRules_limit_lead(autocvar_g_tdm_point_leadlimit);
- if (autocvar_g_tdm_team_spawns)
- have_team_spawns = -1; // request team spawns
+ GameRules_spawning_teams(autocvar_g_tdm_team_spawns);
}
MUTATOR_ONROLLBACK_OR_REMOVE