continue;
s = argv(0);
prio = 1;
- FOREACH_CLIENT(IS_BOT_CLIENT(it), LAMBDA(
+ FOREACH_CLIENT(IS_BOT_CLIENT(it), {
if(s == it.cleanname)
{
prio = 0;
break;
}
- ));
+ });
RandomSelection_AddString(readfile, 1, prio);
}
readfile = RandomSelection_chosen_string;
// number bots with identical names
int j = 0;
- FOREACH_CLIENT(IS_BOT_CLIENT(it), LAMBDA(
+ FOREACH_CLIENT(IS_BOT_CLIENT(it), {
if(it.cleanname == name)
++j;
- ));
+ });
if (j)
this.netname = this.netname_freeme = strzone(strcat(prefix, name, "(", ftos(j), ")", suffix));
else
bestbot = -1;
bestplayer = -1;
- FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(
+ FOREACH_CLIENT(IS_PLAYER(it), {
if(IS_REAL_CLIENT(it))
bestplayer = max(bestplayer, it.totalfrags - it.totalfrags_lastcheck);
else
bestbot = max(bestbot, it.totalfrags - it.totalfrags_lastcheck);
- ));
+ });
LOG_DEBUG("autoskill: best player got ", ftos(bestplayer), ", ");
LOG_DEBUG("best bot got ", ftos(bestbot), "; ");
// don't reset counters, wait for them to accumulate
}
- FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(it.totalfrags_lastcheck = it.totalfrags));
+ FOREACH_CLIENT(IS_PLAYER(it), { it.totalfrags_lastcheck = it.totalfrags; });
}
void bot_calculate_stepheightvec()
activerealplayers = M_ARGV(0, int);
realplayers = M_ARGV(1, int);
} else {
- FOREACH_CLIENT(IS_REAL_CLIENT(it), LAMBDA(
+ FOREACH_CLIENT(IS_REAL_CLIENT(it), {
if(IS_PLAYER(it))
++activerealplayers;
++realplayers;
- ));
+ });
}
int bots;