// these can contain player IDs, so better hide
BADPREFIX("g_forced_team_");
BADCVAR("sv_muteban_list");
+ BADCVAR("sv_allow_customplayermodels_idlist");
+ BADCVAR("sv_allow_customplayermodels_speciallist");
// mapinfo
BADCVAR("fraglimit");
if(to_file)
fputs(file, strcat(s, "\n"));
- FOREACH_CLIENT(IS_REAL_CLIENT(it) || (IS_BOT_CLIENT(it) && autocvar_sv_logscores_bots), LAMBDA(
+ FOREACH_CLIENT(IS_REAL_CLIENT(it) || (IS_BOT_CLIENT(it) && autocvar_sv_logscores_bots), {
s = strcat(":player:see-labels:", GetPlayerScoreString(it, 0), ":");
s = strcat(s, ftos(rint(time - CS(it).jointime)), ":");
if(IS_PLAYER(it) || MUTATOR_CALLHOOK(GetPlayerStatus, it))
GameLogEcho(strcat(s, ftos(it.playerid), ":", playername(it, false)));
if(to_file)
fputs(file, strcat(s, playername(it, false), "\n"));
- ));
+ });
if(teamplay)
{
{
stuffcmd(e, "\nscr_printspeed 1000000\n");
RandomSelection_Init();
- FOREACH_WORD(autocvar_sv_intermission_cdtrack, true, LAMBDA(
+ FOREACH_WORD(autocvar_sv_intermission_cdtrack, true, {
RandomSelection_AddString(it, 1, 1);
- ));
+ });
if (RandomSelection_chosen_string != "")
{
stuffcmd(e, sprintf("\ncd loop %s\n", RandomSelection_chosen_string));
GameLogClose();
- FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(
+ FOREACH_CLIENT(IS_PLAYER(it), {
FixIntermissionClient(it);
if(it.winning)
bprint(playername(it, false), " ^7wins.\n");
- ));
+ });
target_music_kill();
// set the .winning flag for exactly those players with a given field value
void SetWinners(.float field, float value)
{
- FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(it.winning = (it.(field) == value)));
+ FOREACH_CLIENT(IS_PLAYER(it), { it.winning = (it.(field) == value); });
}
// set the .winning flag for those players with a given field value
void AddWinners(.float field, float value)
{
- FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(
+ FOREACH_CLIENT(IS_PLAYER(it), {
if(it.(field) == value)
it.winning = 1;
- ));
+ });
}
// clear the .winning flags
void ClearWinners()
{
- FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(it.winning = 0));
+ FOREACH_CLIENT(IS_PLAYER(it), { it.winning = 0; });
}
void ShuffleMaplist()
team1_score = team2_score = team3_score = team4_score = 0;
- FOREACH_CLIENT(IS_PLAYER(it) && !IS_DEAD(it), LAMBDA(
+ FOREACH_CLIENT(IS_PLAYER(it) && !IS_DEAD(it), {
switch(it.team)
{
case NUM_TEAM_1: team1_score = 1; break;
case NUM_TEAM_3: team3_score = 1; break;
case NUM_TEAM_4: team4_score = 1; break;
}
- ));
+ });
IL_EACH(g_spawnpoints, true,
{
float playerswithlaps;
float readyplayers;
totalplayers = playerswithlaps = readyplayers = 0;
- FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(
+ FOREACH_CLIENT(IS_PLAYER(it), {
++totalplayers;
if(PlayerScore_Add(it, SP_RACE_FASTEST, 0))
++playerswithlaps;
if(it.ready)
++readyplayers;
- ));
+ });
// at least 2 of the players have completed a lap: start the RACE
// otherwise, the players should end the qualifying on their own
redirection_nextthink = time + 1;
clients_found = 0;
- FOREACH_CLIENT(IS_REAL_CLIENT(it), LAMBDA(
+ FOREACH_CLIENT(IS_REAL_CLIENT(it), {
// TODO add timer
LOG_INFO("Redirecting: sending connect command to ", it.netname, "\n");
if(redirection_target == "self")
else
stuffcmd(it, strcat("\ndisconnect; defer ", ftos(autocvar_quit_and_redirect_timer), " \"connect ", redirection_target, "\"\n"));
++clients_found;
- ));
+ });
LOG_INFO("Redirecting: ", ftos(clients_found), " clients left.\n");