void VoteReset()
{
- FOREACH_CLIENT(true, LAMBDA(it.vote_selection = 0));
+ FOREACH_CLIENT(true, { it.vote_selection = 0; });
if (vote_called)
{
Nagger_VoteCountChanged();
// add up all the votes from each connected client
- FOREACH_CLIENT(IS_REAL_CLIENT(it) && IS_CLIENT(it), LAMBDA(
+ FOREACH_CLIENT(IS_REAL_CLIENT(it) && IS_CLIENT(it), {
++vote_player_count;
if (IS_PLAYER(it)) ++vote_real_player_count;
switch (it.vote_selection)
}
default: break;
}
- ));
+ });
// Check to see if there are enough players on the server to allow master voting... otherwise, vote master could be used for evil.
if ((vote_called == VOTE_MASTER) && autocvar_sv_vote_master_playerlimit > vote_player_count)
if (it.reset2) it.reset2(it);
});
- FOREACH_CLIENT(IS_PLAYER(it) && STAT(FROZEN, it), LAMBDA(Unfreeze(it)));
+ FOREACH_CLIENT(IS_PLAYER(it) && STAT(FROZEN, it), { Unfreeze(it); });
// Moving the player reset code here since the player-reset depends
// on spawnpoint entities which have to be reset first --blub
game_starttime = time + RESTART_COUNTDOWN;
// clear player attributes
- FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(
+ FOREACH_CLIENT(IS_PLAYER(it), {
it.alivetime = 0;
CS(it).killcount = 0;
PS_GR_P_ADDVAL(it, PLAYERSTATS_ALIVETIME, -PS_GR_P_ADDVAL(it, PLAYERSTATS_ALIVETIME, 0));
- ));
+ });
restart_mapalreadyrestarted = false; // reset this var, needed when cvar sv_ready_restart_repeatable is in use
warmup_stage = 0; // once the game is restarted the game is in match stage
// reset the .ready status of all players (also spectators)
- FOREACH_CLIENT(IS_REAL_CLIENT(it), LAMBDA(it.ready = false));
+ FOREACH_CLIENT(IS_REAL_CLIENT(it), { it.ready = false; });
readycount = 0;
Nagger_ReadyCounted(); // NOTE: this causes a resend of that entity, and will also turn off warmup state on the client
// after a restart every players number of allowed timeouts gets reset, too
if (autocvar_sv_timeout)
{
- FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it), LAMBDA(CS(it).allowed_timeouts = autocvar_sv_timeout_number));
+ FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it), { CS(it).allowed_timeouts = autocvar_sv_timeout_number; });
}
// reset map immediately if this cvar is not set
if (!autocvar_sv_ready_restart_after_countdown) reset_map(true);
float ready_needed_factor, ready_needed_count;
float t_ready = 0, t_players = 0;
- FOREACH_CLIENT(IS_REAL_CLIENT(it) && (IS_PLAYER(it) || it.caplayer == 1), LAMBDA(
+ FOREACH_CLIENT(IS_REAL_CLIENT(it) && (IS_PLAYER(it) || it.caplayer == 1), {
++t_players;
if (it.ready) ++t_ready;
- ));
+ });
readycount = t_ready;
msg_entity = caller;
}
- FOREACH_CLIENT(IS_REAL_CLIENT(it), LAMBDA(++tmp_playercount));
+ FOREACH_CLIENT(IS_REAL_CLIENT(it), { ++tmp_playercount; });
if (tmp_playercount > 1) Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_VOTE_CALL); // don't announce a "vote now" sound if player is alone
bprint("\{1}^2* ^3", OriginalCallerName(), "^2 calls a vote for ", vote_called_display, "\n");