void LocalCommand_macro_help()
{
- FOREACH(CLIENT_COMMANDS, true, LAMBDA(LOG_INFOF(" ^2%s^7: %s\n", it.m_name, it.m_description)));
+ FOREACH(CLIENT_COMMANDS, true, LOG_INFOF(" ^2%s^7: %s\n", it.m_name, it.m_description));
}
bool LocalCommand_macro_command(int argc, string command)
{
string c = strtolower(argv(0));
- FOREACH(CLIENT_COMMANDS, it.m_name == c, LAMBDA(
+ FOREACH(CLIENT_COMMANDS, it.m_name == c, {
it.m_invokecmd(CMD_REQUEST_COMMAND, NULL, argc, command);
return true;
- ));
+ });
return false;
}
bool LocalCommand_macro_usage(int argc)
{
string c = strtolower(argv(1));
- FOREACH(CLIENT_COMMANDS, it.m_name == c, LAMBDA(
+ FOREACH(CLIENT_COMMANDS, it.m_name == c, {
it.m_invokecmd(CMD_REQUEST_USAGE, NULL, argc, "");
return true;
- ));
+ });
return false;
}
void LocalCommand_macro_write_aliases(int fh)
{
- FOREACH(CLIENT_COMMANDS, true, LAMBDA(CMD_Write_Alias("qc_cmd_cl", it.m_name, it.m_description)));
+ FOREACH(CLIENT_COMMANDS, true, CMD_Write_Alias("qc_cmd_cl", it.m_name, it.m_description));
}
METHOD(clientcommand_##id, m_invokecmd, void(int request, entity caller, int arguments, string command))
STATIC_INIT(CLIENT_COMMANDS_aliases) {
- FOREACH(CLIENT_COMMANDS, true, LAMBDA(localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, "qc_cmd_cl"))));
+ FOREACH(CLIENT_COMMANDS, true, localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, "qc_cmd_cl")));
}
#endif
draw_teamradar_background(hud_panel_radar_foreground_alpha);
- FOREACH_ENTITY_CLASS("radarlink", true, LAMBDA(
- draw_teamradar_link(it.origin, it.velocity, it.team);
- ));
+ FOREACH_ENTITY_CLASS("radarlink", true, draw_teamradar_link(it.origin, it.velocity, it.team));
- FOREACH_ENTITY_FLAGS(teamradar_icon, 0xFFFFFF, LAMBDA(
+ FOREACH_ENTITY_FLAGS(teamradar_icon, 0xFFFFFF, {
if ( hud_panel_radar_mouse )
if ( it.health > 0 )
if ( it.team == myteam+1 || gametype == MAPINFO_TYPE_RACE )
}
entity icon = RadarIcons_from(it.teamradar_icon);
draw_teamradar_icon(it.origin, icon, it, spritelookupcolor(it, icon.netname, it.teamradar_color), panel_fg_alpha);
- ));
- AL_EACH(_entcs, e, it != NULL, LAMBDA(
+ });
+ AL_EACH(_entcs, e, it != NULL, {
if (!it.m_entcs_private) continue;
if (entcs_is_self(it)) continue;
color2 = entcs_GetTeam(it.sv_entnum);
draw_teamradar_player(it.origin, it.angles, Team_ColorRGB(color2));
- ));
+ });
draw_teamradar_player(view_origin, view_angles, '1 1 1');
drawresetcliparea();
weaponorder_cmp_str = strcat(" ", weaponorder_byimpulse, " ");
weapon_cnt = 0;
- FOREACH(Weapons, it != WEP_Null && it.impulse >= 0, LAMBDA(weaponorder[weapon_cnt++] = it));
+ FOREACH(Weapons, it != WEP_Null && it.impulse >= 0, weaponorder[weapon_cnt++] = it);
for(i = weapon_cnt; i < Weapons_MAX; ++i)
weaponorder[i] = NULL;
heapsort(weapon_cnt, weaponorder_swap, weaponorder_cmp, NULL);
// get the all-weapons layout
int nHidden = 0;
WepSet weapons_stat = WepSet_GetFromStat();
- FOREACH(Weapons, it != WEP_Null, LAMBDA(
+ FOREACH(Weapons, it != WEP_Null, {
if (weapons_stat & it.m_wepset) continue;
if (it.spawnflags & WEP_FLAG_MUTATORBLOCKED) nHidden += 1;
- ));
+ });
vector table_size = HUD_GetTableSize_BestItemAR((Weapons_COUNT - 1) - nHidden, padded_panel_size, aspect);
columns = table_size.x;
rows = table_size.y;
#endif
this.enttype = t;
bool done = false;
- FOREACH(LinkedEntities, it.m_id == t, LAMBDA(
+ FOREACH(LinkedEntities, it.m_id == t, {
if (isnew) this.classname = it.netname;
if (autocvar_developer_csqcentities)
LOG_INFOF("CSQC_Ent_Update(%d) at %f with this=%i {.entnum=%d, .enttype=%d} t=%s (%d)\n", isnew, savetime, this, this.entnum, this.enttype, this.classname, t);
done = it.m_read(this, NULL, isnew);
break;
- ));
+ });
time = savetime;
if (!done)
{
// Acquire TE ID
int nTEID = ReadByte();
- FOREACH(TempEntities, it.m_id == nTEID, LAMBDA(
+ FOREACH(TempEntities, it.m_id == nTEID, {
if (autocvar_developer_csqcentities)
LOG_INFOF("CSQC_Parse_TempEntity() nTEID=%s (%d)\n", it.netname, nTEID);
return it.m_read(NULL, NULL, true);
- ));
+ });
if (autocvar_developer_csqcentities)
LOG_INFOF("CSQC_Parse_TempEntity() with nTEID=%d\n", nTEID);
WepSet weapons_inmap = WepSet_GetFromStat_InMap();
float initial_posx = pos.x;
int disownedcnt = 0;
- FOREACH(Weapons, it != WEP_Null, LAMBDA(
+ FOREACH(Weapons, it != WEP_Null, {
int weapon_stats = weapon_accuracy[i - WEP_FIRST];
WepSet set = it.m_wepset;
if (weapon_stats < 0 && !(weapons_stat & set || weapons_inmap & set))
++disownedcnt;
- ));
+ });
int weapon_cnt = (Weapons_COUNT - 1) - disownedcnt;
if (weapon_cnt <= 0) return pos;
vector tmpos = pos;
int column = 0;
- FOREACH(Weapons, it != WEP_Null, LAMBDA(
+ FOREACH(Weapons, it != WEP_Null, {
int weapon_stats = weapon_accuracy[i - WEP_FIRST];
WepSet set = it.m_wepset;
pos.y += height;
}
++column;
- ));
+ });
if (weapons_with_stats)
average_accuracy = floor((average_accuracy * 100 / weapons_with_stats) + 0.5);
if (autocvar_hud_shownames_antioverlap)
{
// fade tag out if another tag that is closer to you overlaps
- LL_EACH(shownames_ent, it != this && entcs_receiver(i), LAMBDA(
+ LL_EACH(shownames_ent, it != this && entcs_receiver(i), {
vector eo = project_3d_to_2d(it.origin);
if (eo.z < 0 || eo.x < 0 || eo.y < 0 || eo.x > vid_conwidth || eo.y > vid_conheight) continue;
eo.z = 0;
overlap = true;
break;
}
- ));
+ });
}
bool onscreen = (o.z >= 0 && o.x >= 0 && o.y >= 0 && o.x <= vid_conwidth && o.y <= vid_conheight);
if (autocvar_hud_shownames_crosshairdistance)
void Draw_ShowNames_All()
{
if (!autocvar_hud_shownames) return;
- LL_EACH(shownames_ent, true, LAMBDA(
+ LL_EACH(shownames_ent, true, {
entity entcs = entcs_receiver(i);
if (!entcs)
{
if (!it.csqcmodel_isdead) setorigin(it, entcs.origin);
it.csqcmodel_isdead = dead;
Draw_ShowNames(it);
- ));
+ });
}
if(myteam != prev_myteam)
{
myteamcolors = colormapPaletteColor(myteam, 1);
- FOREACH(hud_panels, true, LAMBDA(it.update_time = time));
+ FOREACH(hud_panels, true, it.update_time = time);
prev_myteam = myteam;
}
if(ons_roundlost)
{
- FOREACH_ENTITY_CLASS("onslaught_generator", it.health <= 0, LAMBDA(
+ FOREACH_ENTITY_CLASS("onslaught_generator", it.health <= 0, {
gen = it;
break;
- ));
+ });
if(!gen)
ons_roundlost = false; // don't enforce the 3rd person camera if there is no dead generator to show
}
mousepos = mousepos*0.5 + getmousepos();
*/
- FOREACH_ENTITY(it.draw, LAMBDA(it.draw(it)));
+ FOREACH_ENTITY(it.draw, it.draw(it));
addentities(MASK_NORMAL | MASK_ENGINE | MASK_ENGINEVIEWMODELS);
renderscene();
} else */
// draw 2D entities
- FOREACH_ENTITY(it.draw2d, LAMBDA(it.draw2d(it)));
+ FOREACH_ENTITY(it.draw2d, it.draw2d(it));
Draw_ShowNames_All();
Debug_Draw();
bool monsters_animoverride(entity this)
{
Monster monster_id = NULL;
- FOREACH(Monsters, it != MON_Null, LAMBDA(
- if(it.model == this.model)
- {
- monster_id = it;
- break;
- }
- ));
+ FOREACH(Monsters, it != MON_Null && it.model == this.model, {
+ monster_id = it;
+ break;
+ });
if(!monster_id) { return false; }
METHOD(genericcommand_##id, m_invokecmd, void(int request, entity caller, int arguments, string command))
STATIC_INIT(GENERIC_COMMANDS_aliases) {
- FOREACH(GENERIC_COMMANDS, true, LAMBDA(localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, "qc_cmd_svmenu"))));
+ FOREACH(GENERIC_COMMANDS, true, localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, "qc_cmd_svmenu")));
}
#include "generic.qh"
void GenericCommand_macro_help()
{
- FOREACH(GENERIC_COMMANDS, true, LAMBDA(LOG_INFOF(" ^2%s^7: %s\n", it.m_name, it.m_description)));
+ FOREACH(GENERIC_COMMANDS, true, LOG_INFOF(" ^2%s^7: %s\n", it.m_name, it.m_description));
}
float GenericCommand_macro_command(float argc, string command)
{
string c = strtolower(argv(0));
- FOREACH(GENERIC_COMMANDS, it.m_name == c, LAMBDA(
+ FOREACH(GENERIC_COMMANDS, it.m_name == c, {
it.m_invokecmd(CMD_REQUEST_COMMAND, NULL, argc, command);
return true;
- ));
+ });
return false;
}
float GenericCommand_macro_usage(float argc)
{
string c = strtolower(argv(1));
- FOREACH(GENERIC_COMMANDS, it.m_name == c, LAMBDA(
+ FOREACH(GENERIC_COMMANDS, it.m_name == c, {
it.m_invokecmd(CMD_REQUEST_USAGE, NULL, argc, "");
return true;
- ));
+ });
return false;
}
void GenericCommand_macro_write_aliases(float fh)
{
- FOREACH(GENERIC_COMMANDS, true, LAMBDA(CMD_Write_Alias("qc_cmd_svmenu", it.m_name, it.m_description)));
+ FOREACH(GENERIC_COMMANDS, true, CMD_Write_Alias("qc_cmd_svmenu", it.m_name, it.m_description));
}
static int debugdraw_frame;
++debugdraw_frame;
const int sz = 8;
- FOREACH_ENTITY(true, LAMBDA(
+ FOREACH_ENTITY(true, {
if (it.debugdraw_last == debugdraw_frame) continue;
int ofs = 0;
FOREACH_ENTITY_RADIUS(it.origin, 100, it.debugdraw_last != debugdraw_frame, {
sz * '1 1 0', rgb, 0.5, DRAWFLAG_NORMAL);
++ofs;
});
- ));
+ });
}
#endif
{
case CMD_REQUEST_COMMAND:
{
- FOREACH_ENTITY_CLASS_ORDERED(argv(1), true, LAMBDA(LOG_INFOF("%i (%s)\n", it, it.classname)));
+ FOREACH_ENTITY_CLASS_ORDERED(argv(1), true, LOG_INFOF("%i (%s)\n", it, it.classname));
return;
}
case CMD_REQUEST_COMMAND:
{
vector match = stov(argv(1));
- FOREACH_ENTITY_ORDERED(it.origin == match, LAMBDA(LOG_INFOF("%i (%s)\n", it, it.classname)));
+ FOREACH_ENTITY_ORDERED(it.origin == match, LOG_INFOF("%i (%s)\n", it, it.classname));
return;
}
net_eff.eent_net_count = eff_cnt;
net_eff.eent_eff_trail = eff.eent_eff_trail;
- FOREACH_CLIENT(IS_REAL_CLIENT(it), LAMBDA(Net_Write_Effect(net_eff, it, 0)));
+ FOREACH_CLIENT(IS_REAL_CLIENT(it), Net_Write_Effect(net_eff, it, 0));
remove(net_eff);
}
void Send_Effect_(string eff_name, vector eff_loc, vector eff_vel, int eff_cnt)
{
// problem with this is, we might not have all the available effects for it
- FOREACH(Effects, it.eent_eff_name == eff_name, LAMBDA(
+ FOREACH(Effects, it.eent_eff_name == eff_name, {
Send_Effect(it, eff_loc, eff_vel, eff_cnt);
return;
- ));
+ });
// revert to engine handling
__pointparticles(_particleeffectnum(eff_name), eff_loc, eff_vel, eff_cnt);
}
e.oldorigin_x = compressShortVector(e.velocity);
- FOREACH_CLIENT(IS_REAL_CLIENT(it), LAMBDA(Violence_GibSplash_SendEntity(e, it, 0)));
+ FOREACH_CLIENT(IS_REAL_CLIENT(it), Violence_GibSplash_SendEntity(e, it, 0));
remove(e);
}
entity GetVoiceMessage(string type)
{
- FOREACH(PlayerSounds, it.m_playersoundstr == type && it.instanceOfVoiceMessage == true, LAMBDA(return it));
+ FOREACH(PlayerSounds, it.m_playersoundstr == type && it.instanceOfVoiceMessage == true, return it);
return NULL;
}
entity GetPlayerSound(string type)
{
- FOREACH(PlayerSounds, it.m_playersoundstr == type && it.instanceOfVoiceMessage == false, LAMBDA(return it));
+ FOREACH(PlayerSounds, it.m_playersoundstr == type && it.instanceOfVoiceMessage == false, return it);
return NULL;
}
string allvoicesamples;
STATIC_INIT(allvoicesamples)
{
- FOREACH(PlayerSounds, it.instanceOfVoiceMessage, LAMBDA(
- allvoicesamples = strcat(allvoicesamples, " ", it.m_playersoundstr)
- ));
+ FOREACH(PlayerSounds, it.instanceOfVoiceMessage, allvoicesamples = strcat(allvoicesamples, " ", it.m_playersoundstr));
allvoicesamples = strzone(substring(allvoicesamples, 1, -1));
}
if (fake) { msg_entity = this; X(); }
else
{
- FOREACH_CLIENT(IS_REAL_CLIENT(it) && (!teamplay || msg_entity.team == this.team), LAMBDA(
+ FOREACH_CLIENT(IS_REAL_CLIENT(it) && (!teamplay || msg_entity.team == this.team), {
msg_entity = it;
X();
- ));
+ });
}
#undef X
break;
}
else
{
- FOREACH_CLIENT(IS_REAL_CLIENT(it), LAMBDA(
+ FOREACH_CLIENT(IS_REAL_CLIENT(it), {
msg_entity = it;
X();
- ));
+ });
}
#undef X
break;
REGISTRY_SORT(PlayerSounds)
STATIC_INIT(PlayerSounds_renumber)
{
- FOREACH(PlayerSounds, true, LAMBDA(it.m_id = i));
+ FOREACH(PlayerSounds, true, it.m_id = i);
}
REGISTRY_CHECK(PlayerSounds)
REGISTRY_SORT(GlobalSounds)
STATIC_INIT(GlobalSounds_renumber)
{
- FOREACH(GlobalSounds, true, LAMBDA(it.m_id = i));
+ FOREACH(GlobalSounds, true, it.m_id = i);
}
REGISTRY_CHECK(GlobalSounds)
void PrecacheGlobalSound(string samplestring);
PRECACHE(GlobalSounds)
{
- FOREACH(GlobalSounds, true, LAMBDA(PrecacheGlobalSound(it.m_globalsoundstr)));
+ FOREACH(GlobalSounds, true, PrecacheGlobalSound(it.m_globalsoundstr));
}
REGISTER_GLOBALSOUND(STEP, "misc/footstep0 6")
e.nextthink = time;
Net_LinkEntity(e, false, 0, entcs_send);
if (!IS_REAL_CLIENT(player)) return;
- FOREACH_CLIENT(true, LAMBDA(
+ FOREACH_CLIENT(true, {
assert(it.entcs);
_entcs_send(it.entcs, msg_entity = player, BITS(23), MSG_ONE);
- ));
+ });
}
void entcs_detach(entity player)
int _enemy_count = 0;
int _friendly_count = 0;
- FOREACH_CLIENT(IS_PLAYER(it) && !IS_DEAD(it), LAMBDA(
+ FOREACH_CLIENT(IS_PLAYER(it) && !IS_DEAD(it), {
if(vdist(it.origin - self.origin, <, autocvar_g_onslaught_cp_proxydecap_distance))
{
if(SAME_TEAM(it, self))
else
++_enemy_count;
}
- ));
+ });
_friendly_count = _friendly_count * (autocvar_g_onslaught_cp_proxydecap_dps * ONS_CP_THINKRATE);
_enemy_count = _enemy_count * (autocvar_g_onslaught_cp_proxydecap_dps * ONS_CP_THINKRATE);
if (time > this.pain_finished)
{
this.pain_finished = time + 10;
- FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it) && SAME_TEAM(it, this), LAMBDA(Send_Notification(NOTIF_ONE, it, MSG_CENTER, CENTER_GENERATOR_UNDERATTACK)));
+ FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it) && SAME_TEAM(it, this), Send_Notification(NOTIF_ONE, it, MSG_CENTER, CENTER_GENERATOR_UNDERATTACK));
play2team(this.team, SND(ONS_GENERATOR_UNDERATTACK));
}
}
if(!self.isshielded && self.wait < time)
{
self.wait = time + 5;
- FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it), LAMBDA(
+ FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it), {
if(SAME_TEAM(it, self))
{
Send_Notification(NOTIF_ONE, it, MSG_CENTER, CENTER_ONS_NOTSHIELDED_TEAM);
}
else
Send_Notification(NOTIF_ONE, it, MSG_CENTER, APP_TEAM_NUM(self.team, CENTER_ONS_NOTSHIELDED));
- ));
+ });
}
}
}
round_handler_Init(7, autocvar_g_onslaught_warmup, autocvar_g_onslaught_round_timelimit);
- FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(
+ FOREACH_CLIENT(IS_PLAYER(it), {
it.ons_roundlost = true;
it.player_blocked = true;
nades_Clear(it);
- ));
+ });
return 1;
}
void Onslaught_RoundStart()
{
entity tmp_entity;
- FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(it.player_blocked = false));
+ FOREACH_CLIENT(IS_PLAYER(it), it.player_blocked = false);
for(tmp_entity = ons_worldcplist; tmp_entity; tmp_entity = tmp_entity.ons_worldcpnext)
tmp_entity.sprite.SendFlags |= 16;
// Needs weapons?
c = 0;
- FOREACH(Weapons, it != WEP_Null, LAMBDA(
+ FOREACH(Weapons, it != WEP_Null, {
if(self.weapons & (it.m_wepset))
if(++c >= 4)
break;
- ));
+ });
if(c<4)
needweapons = true;
// Count team mates interested in this control point
// (easier and cleaner than keeping counters per cp and teams)
- FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(
+ FOREACH_CLIENT(IS_PLAYER(it), {
if(SAME_TEAM(it, self))
if(it.havocbot_role_flags & HAVOCBOT_ONS_ROLE_OFFENSE)
if(it.havocbot_ons_target == cp2)
++c;
- ));
+ });
// NOTE: probably decrease the cost of attackable control points
cp2.wpcost = c;
MUTATOR_HOOKFUNCTION(ons, reset_map_global)
{SELFPARAM();
- FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(
+ FOREACH_CLIENT(IS_PLAYER(it), {
it.ons_roundlost = false;
it.ons_deathloc = '0 0 0';
WITH(entity, self, it, PutClientInServer());
- ));
+ });
return false;
}
REGISTRY_SORT(IMPULSES)
STATIC_INIT(IMPULSES_renumber)
{
- FOREACH(IMPULSES, true, LAMBDA(it.m_id = i));
+ FOREACH(IMPULSES, true, it.m_id = i);
}
REGISTRY_CHECK(IMPULSES)
void Dump_Items()
{
- FOREACH(Items, true, LAMBDA(
- ITEM_HANDLE(Show, it);
- ));
+ FOREACH(Items, true, ITEM_HANDLE(Show, it));
}
string Item_Model(string item_mdl)
REGISTRY_SORT(Items)
REGISTRY_CHECK(Items)
-STATIC_INIT(Items) { FOREACH(Items, true, LAMBDA(it.m_id = i)); }
+STATIC_INIT(Items) { FOREACH(Items, true, it.m_id = i); }
void Dump_Items();
{
make_pure(this);
const int bits = ReadInt24_t();
- FOREACH(Items, bits & BIT(it.m_id), LAMBDA(
+ FOREACH(Items, bits & BIT(it.m_id), {
.int fld = inv_items[it.m_id];
int prev = this.(fld);
int next = this.(fld) = ReadByte();
LOG_TRACEF("%s: %.0f -> %.0f\n", it.m_name, prev, next);
- ));
+ });
return true;
}
#endif
void Inventory_Write(Inventory data)
{
int bits = 0;
- FOREACH(Items, true, LAMBDA(
+ FOREACH(Items, true, {
.int fld = inv_items[it.m_id];
bits = BITSET(bits, BIT(it.m_id), data.inventory.(fld) != (data.inventory.(fld) = data.(fld)));
- ));
+ });
WriteInt24_t(MSG_ENTITY, bits);
- FOREACH(Items, bits & BIT(it.m_id), LAMBDA(
+ FOREACH(Items, bits & BIT(it.m_id), {
WriteByte(MSG_ENTITY, data.inv_items[it.m_id]);
- ));
+ });
}
#endif
string _MapInfo_GetDefaultEx(float t)
{
- FOREACH(Gametypes, it.items == t, LAMBDA(return it.model2));
+ FOREACH(Gametypes, it.items == t, return it.model2);
return "";
}
float _MapInfo_GetTeamPlayBool(float t)
{
- FOREACH(Gametypes, it.items == t, LAMBDA(return it.team));
+ FOREACH(Gametypes, it.items == t, return it.team);
return false;
}
cvar_set("timelimit", cvar_defstring("timelimit"));
cvar_set("leadlimit", cvar_defstring("leadlimit"));
cvar_set("fraglimit", cvar_defstring("fraglimit"));
- FOREACH(Gametypes, true, LAMBDA(it.m_parse_mapinfo(string_null, string_null)));
+ FOREACH(Gametypes, true, it.m_parse_mapinfo(string_null, string_null));
string fraglimit_normal = string_null;
string fraglimit_teams = string_null;
break;
}
}
- FOREACH(Gametypes, true, LAMBDA(handled |= it.m_parse_mapinfo(k, v)));
+ FOREACH(Gametypes, true, handled |= it.m_parse_mapinfo(k, v));
if (!handled)
LOG_MAPWARNF("Invalid gametype setting in mapinfo for gametype %s: %s\n", MapInfo_Type_ToString(pWantedType), sa);
}
Gametype MapInfo_Type(int t)
{
- FOREACH(Gametypes, it.items == t, LAMBDA(return it));
+ FOREACH(Gametypes, it.items == t, return it);
return NULL;
}
deprecate(assault, as);
deprecate(race, rc);
if (t == "all") return MAPINFO_TYPE_ALL;
- FOREACH(Gametypes, it.mdl == t, LAMBDA(return it.items));
+ FOREACH(Gametypes, it.mdl == t, return it.items);
return 0;
#undef deprecate
}
string MapInfo_Type_Description(float t)
{
- FOREACH(Gametypes, it.items == t, LAMBDA(return it.gametype_description));
+ FOREACH(Gametypes, it.items == t, return it.gametype_description);
return "";
}
{
if(t == MAPINFO_TYPE_ALL)
return "all";
- FOREACH(Gametypes, it.items == t, LAMBDA(return it.mdl));
+ FOREACH(Gametypes, it.items == t, return it.mdl);
return "";
}
string MapInfo_Type_ToText(float t)
{
- FOREACH(Gametypes, it.items == t, LAMBDA(return it.message));
+ FOREACH(Gametypes, it.items == t, return it.message);
/* xgettext:no-c-format */
return _("@!#%'n Tuba Throwing");
}
int MapInfo_CurrentGametype()
{
int prev = cvar("gamecfg");
- FOREACH(Gametypes, cvar(it.netname) && it.items != prev, LAMBDA(return it.items));
+ FOREACH(Gametypes, cvar(it.netname) && it.items != prev, return it.items);
if (prev) return prev;
return MAPINFO_TYPE_DEATHMATCH;
}
void MapInfo_SwitchGameType(int t)
{
- FOREACH(Gametypes, true, LAMBDA(
- cvar_set(it.netname, (it.items == t) ? "1" : "0")
- ));
+ FOREACH(Gametypes, true, cvar_set(it.netname, (it.items == t) ? "1" : "0"));
}
void MapInfo_LoadMap(string s, float reinit)
{
entity curr;
entity prev = self;
- FOREACH(Minigames, true, LAMBDA(
- {
- curr = HUD_MinigameMenu_SpawnSubEntry(
- it.message, HUD_MinigameMenu_ClickCreate_Entry, self );
+ FOREACH(Minigames, true, {
+ curr = HUD_MinigameMenu_SpawnSubEntry(it.message, HUD_MinigameMenu_ClickCreate_Entry, self);
curr.netname = it.netname;
curr.model = strzone(minigame_texture(strcat(it.netname,"/icon")));
HUD_MinigameMenu_InsertEntry( curr, prev );
prev = curr;
- }));
+ });
}
}
entity minigame_get_descriptor(string id)
{
- FOREACH(Minigames, true, LAMBDA(
- {
- if(it.netname == id)
- return it;
- }));
- return world;
+ FOREACH(Minigames, it.netname == id, return it);
+ return NULL;
}
// Get letter index of a tile name
}
else if ( minig_cmd == "list" )
{
- FOREACH(Minigames, true, LAMBDA(
- {
- sprint(self,it.netname," (",it.message,") ","\n");
- }));
+ FOREACH(Minigames, true, sprint(self, it.netname, " (", it.message, ") ", "\n"));
return;
}
else if ( minig_cmd == "list-sessions" )
REGISTER(Models, MDL, name, m_id, NEW(Model, MDL_##name##_get))
PRECACHE(Models) {
- FOREACH(Models, true, LAMBDA({
- it.model_precache(it);
- }));
+ FOREACH(Models, true, it.model_precache(it));
}
MODEL(Null, "null");
{
string s = this.netname;
WITH(bool, mutator_log, true, LAMBDA(
- FOREACH(Mutators, it.registered_id == s, LAMBDA(Mutator_Remove(it)));
+ FOREACH(Mutators, it.registered_id == s, Mutator_Remove(it));
));
}
NET_HANDLE(Mutator, bool isNew)
this.entremove = NET_Mutator_Remove;
int added = 0;
WITH(bool, mutator_log, true, LAMBDA(
- FOREACH(Mutators, it.registered_id == s, LAMBDA(Mutator_Add(it); ++added));
+ FOREACH(Mutators, it.registered_id == s, { Mutator_Add(it); ++added; });
));
if (added > 1) LOG_WARNINGF("Added more than one mutator for %s\n", s);
}
}
STATIC_INIT_LATE(Mutators) {
- FOREACH(Mutators, it.mutatorcheck(), LAMBDA(Mutator_Add(it)));
+ FOREACH(Mutators, it.mutatorcheck(), Mutator_Add(it));
}
#define MUTATOR_ONADD if (mode == MUTATOR_ADDING)
void sv_notice_toall(string _notice, float _howlong, float _modal)
{
- FOREACH_CLIENT(IS_REAL_CLIENT(it), LAMBDA(sv_notice_to(it, _notice, _howlong, _modal)));
+ FOREACH_CLIENT(IS_REAL_CLIENT(it), sv_notice_to(it, _notice, _howlong, _modal));
}
#endif // SVQC
void cl_notice_run()
{
bool flag = false;
- LL_EACH(cl_notices, it.alpha > time, LAMBDA(flag = true; break));
+ LL_EACH(cl_notices, it.alpha > time, { flag = true; break; });
if (!flag) return;
const int M1 = 30;
const int M2 = 10;
#define OUT(s, z) MACRO_BEGIN { drawcolorcodedstring(v3, s, '1 1 0' * z, 1, DRAWFLAG_NORMAL); v3.y += z + 4; } MACRO_END
OUT(_("^1Server notices:"), 32);
- LL_EACH(cl_notices, it.alpha > time, LAMBDA(
+ LL_EACH(cl_notices, it.alpha > time, {
string s = sprintf(_("^7%s (^3%d sec left)"), it.netname , rint(it.alpha - time));
OUT(s, 16);
- ));
+ });
#undef OUT
}
REGISTRY(Notifications, BITS(11))
REGISTER_REGISTRY(Notifications)
-REGISTRY_SORT(Notifications); STATIC_INIT(Notifications) { FOREACH(Notifications, true, LAMBDA(it.m_id = i)); }
+REGISTRY_SORT(Notifications); STATIC_INIT(Notifications) { FOREACH(Notifications, true, it.m_id = i); }
REGISTRY_CHECK(Notifications)
const int NOTIF_CHOICE_MAX = 50;
{
#define ACCMAC(suffix, field) \
PS_GR_P_ADDVAL(p, sprintf("acc-%s-%s", it.netname, suffix), p.accuracy.(field[i-1]));
- FOREACH(Weapons, it != WEP_Null, LAMBDA(
+ FOREACH(Weapons, it != WEP_Null, {
ACCMAC("hit", accuracy_hit)
ACCMAC("fired", accuracy_fired)
ACCMAC("cnt-hit", accuracy_cnt_hit)
ACCMAC("cnt-fired", accuracy_cnt_fired)
ACCMAC("frags", accuracy_frags)
- ));
+ });
#undef ACCMAC
}
PlayerScore_Sort(scoreboard_pos, 1, 1, 1);
if(teamplay) { PlayerScore_TeamStats(); }
- FOREACH_CLIENT(true, LAMBDA(
+ FOREACH_CLIENT(true, {
// add personal score rank
PS_GR_P_ADDVAL(it, PLAYERSTATS_RANK, it.score_dummyfield);
// collect final player information
PlayerStats_GameReport_FinalizePlayer(it);
- ));
+ });
if(autocvar_g_playerstats_gamereport_uri != "")
{
PlayerStats_GameReport_AddEvent(PLAYERSTATS_RANK);
// accuracy stats
- FOREACH(Weapons, it != WEP_Null, LAMBDA(
+ FOREACH(Weapons, it != WEP_Null, {
PlayerStats_GameReport_AddEvent(strcat("acc-", it.netname, "-hit"));
PlayerStats_GameReport_AddEvent(strcat("acc-", it.netname, "-fired"));
PlayerStats_GameReport_AddEvent(strcat("acc-", it.netname, "-cnt-hit"));
PlayerStats_GameReport_AddEvent(strcat("acc-", it.netname, "-cnt-fired"));
PlayerStats_GameReport_AddEvent(strcat("acc-", it.netname, "-frags"));
- ));
+ });
PlayerStats_GameReport_AddEvent(PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_3);
PlayerStats_GameReport_AddEvent(PLAYERSTATS_ACHIEVEMENT_KILL_SPREE_5);
db_close(PS_B_IN_DB);
PS_B_IN_DB = -1;
- FOREACH_CLIENT(IS_REAL_CLIENT(it), LAMBDA(it.playerstats_basicstatus = PS_B_STATUS_IDLE));
+ FOREACH_CLIENT(IS_REAL_CLIENT(it), it.playerstats_basicstatus = PS_B_STATUS_IDLE);
}
}
}
void play2team(float t, string filename)
{
if (autocvar_bot_sound_monopoly) return;
- FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it) && it.team == t, LAMBDA(play2(it, filename)));
+ FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it) && it.team == t, play2(it, filename));
}
void play2all(string samp)
#define SND(id) Sound_fixpath(SND_##id)
PRECACHE(Sounds) {
- FOREACH(Sounds, true, LAMBDA({
- it.sound_precache(it);
- }));
+ FOREACH(Sounds, true, it.sound_precache(it));
}
SOUND(Null, "misc/null");
if(self.waypointsprite_attached)
{
setself(self.waypointsprite_attached);
- FOREACH_CLIENT(IS_REAL_CLIENT(it), LAMBDA(
+ FOREACH_CLIENT(IS_REAL_CLIENT(it), {
if(self.waypointsprite_visible_for_player(it))
{
msg_entity = it;
soundto(MSG_ONE, this, CH_TRIGGER, SND(ITEMRESPAWNCOUNTDOWN), VOL_BASE, ATTEN_NORM); // play respawn sound
}
- ));
+ });
setself(this);
WaypointSprite_Ping(self.waypointsprite_attached);
if (w || (item.spawnshieldtime && item.pickup_anyway > 0))
{
pickedup = true;
- FOREACH(Weapons, it != WEP_Null, LAMBDA(
+ FOREACH(Weapons, it != WEP_Null, {
if(w & (it.m_wepset))
{
W_DropEvent(wr_pickup, player, it.m_id, item);
W_GiveWeapon(player, it.m_id);
}
- ));
+ });
}
}
c = 0;
// Detect needed ammo
- FOREACH(Weapons, it != WEP_Null, LAMBDA(
+ FOREACH(Weapons, it != WEP_Null, {
if(!(player.weapons & (it.m_wepset)))
continue;
need_plasma = true;
else if(it.items & ITEM_JetpackFuel.m_itemid)
need_fuel = true;
- ));
+ });
// TODO: figure out if the player even has the weapon this ammo is for?
// may not affect strategy much though...
else if(argv(i) == "fuel_regen") self.items |= ITEM_JetpackRegen.m_itemid;
else
{
- FOREACH(Weapons, it != WEP_Null, LAMBDA(
+ FOREACH(Weapons, it != WEP_Null, {
s = W_UndeprecateName(argv(i));
if(s == it.netname)
{
it.wr_init(it);
break;
}
- ));
+ });
}
}
if(self.ammo_fuel != 0) self.netname = sprintf("%s %s%d %s", self.netname, valueprefix, max(0, self.ammo_fuel), "fuel");
if(self.health != 0) self.netname = sprintf("%s %s%d %s", self.netname, valueprefix, max(0, self.health), "health");
if(self.armorvalue != 0) self.netname = sprintf("%s %s%d %s", self.netname, valueprefix, max(0, self.armorvalue), "armor");
- FOREACH(Weapons, it != WEP_Null, LAMBDA(self.netname = sprintf("%s %s%d %s", self.netname, itemprefix, !!(self.weapons & (it.m_wepset)), it.netname)));
+ FOREACH(Weapons, it != WEP_Null, self.netname = sprintf("%s %s%d %s", self.netname, itemprefix, !!(self.weapons & (it.m_wepset)), it.netname));
}
self.netname = strzone(self.netname);
//print(self.netname, "\n");
n = tokenize_console(self.netname);
for(i = 0; i < n; ++i)
{
- FOREACH(Weapons, it != WEP_Null, LAMBDA(
- if(argv(i) == it.netname)
- {
- it.wr_init(it);
- break;
- }
- ));
+ FOREACH(Weapons, it != WEP_Null && argv(i) == it.netname, {
+ it.wr_init(it);
+ break;
+ });
}
}
got += GiveValue(e, health, op, val);
got += GiveValue(e, armorvalue, op, val);
case "allweapons":
- FOREACH(Weapons, it != WEP_Null, LAMBDA(
- if(!(it.spawnflags & WEP_FLAG_MUTATORBLOCKED))
- got += GiveWeapon(e, it.m_id, op, val);
- ));
+ FOREACH(Weapons, it != WEP_Null && !(it.spawnflags & WEP_FLAG_MUTATORBLOCKED), got += GiveWeapon(e, it.m_id, op, val));
case "allammo":
got += GiveValue(e, ammo_cells, op, val);
got += GiveValue(e, ammo_plasma, op, val);
got += GiveValue(e, ammo_fuel, op, val);
break;
default:
- FOREACH(Weapons, it != WEP_Null, LAMBDA(
- if(cmd == it.netname)
- {
- got += GiveWeapon(e, it.m_id, op, val);
- break;
- }
- ));
+ FOREACH(Weapons, it != WEP_Null && cmd == it.netname, {
+ got += GiveWeapon(e, it.m_id, op, val);
+ break;
+ });
break;
}
val = 999;
POSTGIVE_BIT(e, items, IT_UNLIMITED_SUPERWEAPONS, SND_POWERUP, SND_POWEROFF);
POSTGIVE_BIT(e, items, IT_UNLIMITED_WEAPON_AMMO, SND_POWERUP, SND_POWEROFF);
POSTGIVE_BIT(e, items, ITEM_Jetpack.m_itemid, SND_ITEMPICKUP, SND_Null);
- FOREACH(Weapons, it != WEP_Null, LAMBDA(
+ FOREACH(Weapons, it != WEP_Null, {
POSTGIVE_WEAPON(e, it, SND_WEAPONPICKUP, SND_Null);
if(!(save_weapons & (it.m_wepset)))
if(e.weapons & (it.m_wepset))
it.wr_init(it);
- ));
+ });
POSTGIVE_VALUE(e, strength_finished, 1, SND_POWERUP, SND_POWEROFF);
POSTGIVE_VALUE(e, invincible_finished, 1, SND_Shield, SND_POWEROFF);
POSTGIVE_VALUE(e, ammo_nails, 0, SND_ITEMPICKUP, SND_Null);
int plnum = 0;
int realplnum = 0;
// let's not count bots
- FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it), LAMBDA(
+ FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it), {
++realplnum;
if(it.chlevel_targ == self)
++plnum;
- ));
+ });
if(plnum < ceil(realplnum * min(1, self.count))) // 70% of players
return;
}
msg_entity = activator;
target_music_sendto(MSG_ONE, 1);
}
- FOREACH_CLIENT(IS_SPEC(it) && it.enemy == activator, LAMBDA(
+ FOREACH_CLIENT(IS_SPEC(it) && it.enemy == activator, {
msg_entity = it;
target_music_sendto(MSG_ONE, 1);
- ));
+ });
}
spawnfunc(target_music)
{
entity best = music_default;
if (music_target && time < music_target.lifetime) best = music_target;
if (music_trigger) best = music_trigger;
- LL_EACH(TargetMusic_list, it.noise, LAMBDA(
+ LL_EACH(TargetMusic_list, it.noise, {
const float vol0 = (getsoundtime(it, CH_BGM_SINGLE) >= 0) ? it.lastvol : -1;
if (it == best)
{
_sound(it, CH_BGM_SINGLE, "", vol, ATTEN_NONE);
it.lastvol = vol;
}
- ));
+ });
music_trigger = world;
bgmtime = (best) ? getsoundtime(best, CH_BGM_SINGLE) : gettime(GETTIME_CDTRACK);
}
const string noi = ReadString();
entity e = NULL;
- LL_EACH(TargetMusic_list, it.count == id, LAMBDA(e = it; break));
+ LL_EACH(TargetMusic_list, it.count == id, { e = it; break; });
if (!e)
{
LL_PUSH(TargetMusic_list, e = new_pure(TargetMusic));
self.use = trigger_teleport_use;
if(self.noise != "")
- FOREACH_WORD(self.noise, true, LAMBDA(precache_sound(it)));
+ FOREACH_WORD(self.noise, true, precache_sound(it));
// this must be called to spawn the teleport waypoints for bots
InitializeEntity(self, teleport_findtarget, INITPRIO_FINDTARGET);
void Dump_Turret_Settings()
{
float x, totalsettings = 0;
- FOREACH(Turrets, it != TUR_Null, LAMBDA({
+ FOREACH(Turrets, it != TUR_Null, {
// step 1: clear the queue
TUR_CONFIG_COUNT = 0;
for(x = 0; x <= MAX_TUR_CONFIG; ++x)
// step 5: debug info
LOG_INFO(sprintf("#%d: %s: %d settings...\n", i, it.turret_name, TUR_CONFIG_COUNT));
totalsettings += TUR_CONFIG_COUNT;
- }));
+ });
// clear queue now that we're finished
TUR_CONFIG_COUNT = 0;
if (autocvar_g_turrets_reloadcvars == 1)
{
- FOREACH_ENTITY(IS_TURRET(it), LAMBDA(
+ FOREACH_ENTITY(IS_TURRET(it), {
load_unit_settings(it, true);
Turret tur = get_turretinfo(it.m_id);
tur.tr_think(tur, it);
- ));
+ });
cvar_set("g_turrets_reloadcvars", "0");
}
}
if(DIFF_TEAM(pl, veh))
if(autocvar_g_vehicles_steal)
{
- FOREACH_CLIENT(IS_PLAYER(it) && SAME_TEAM(it, veh), LAMBDA(Send_Notification(NOTIF_ONE, it, MSG_CENTER, CENTER_VEHICLE_STEAL)));
+ FOREACH_CLIENT(IS_PLAYER(it) && SAME_TEAM(it, veh), Send_Notification(NOTIF_ONE, it, MSG_CENTER, CENTER_VEHICLE_STEAL));
Send_Notification(NOTIF_ONE, pl, MSG_CENTER, CENTER_VEHICLE_STEAL_SELF);
if(self.vehicle_controller)
self.team = self.vehicle_controller.team;
- FOREACH_CLIENT(IS_PLAYER(it) && it.hook.aiment == self, LAMBDA(RemoveGrapplingHook(it)));
+ FOREACH_CLIENT(IS_PLAYER(it) && it.hook.aiment == self, RemoveGrapplingHook(it));
vehicles_reset_colors();
{
if (s == "0" || stof(s)) return s;
s = W_UndeprecateName(s);
- FOREACH(Weapons, it != WEP_Null && it.netname == s, LAMBDA(return ftos(i)));
+ FOREACH(Weapons, it != WEP_Null && it.netname == s, return ftos(i));
return s;
}
string W_NumberWeaponOrder(string order)
for (i = 0; i < n; ++i)
{
RandomSelection_Init();
- FOREACH(Weapons, it != WEP_Null, LAMBDA(
+ FOREACH(Weapons, it != WEP_Null, {
if (remaining & (it.m_wepset))
RandomSelection_Add(it, 0, string_null, 1, 1);
- ));
+ });
Weapon w = RandomSelection_chosen_ent;
result |= WepSet_FromWeapon(w);
remaining &= ~WepSet_FromWeapon(w);
REGISTRY(Weapons, 72) // Increase as needed. Can be up to 72.
#define Weapons_from(i) _Weapons_from(i, WEP_Null)
REGISTER_REGISTRY(Weapons)
-STATIC_INIT(WeaponPickup) { FOREACH(Weapons, true, LAMBDA(it.m_pickup = NEW(WeaponPickup, it))); }
+STATIC_INIT(WeaponPickup) { FOREACH(Weapons, true, it.m_pickup = NEW(WeaponPickup, it)); }
.WepSet m_wepset;
#define WEPSET(id) (WEP_##id.m_wepset)
STATIC_INIT(register_weapons_done)
{
- FOREACH(Weapons, true, LAMBDA(
+ FOREACH(Weapons, true, {
WepSet set = it.m_wepset = _WepSet_FromWeapon(it.m_id = i);
WEPSET_ALL |= set;
if ((it.spawnflags) & WEP_FLAG_SUPERWEAPON) WEPSET_SUPERWEAPONS |= set;
localcmd(sprintf("alias weapon_%s \"impulse %d\"\n", it.netname, imp));
else
LOG_TRACEF("Impulse limit exceeded, weapon will not be directly accessible: %s\n", it.netname);
- ));
+ });
#ifdef CSQC
- FOREACH(Weapons, true, LAMBDA(it.wr_init(it)));
+ FOREACH(Weapons, true, it.wr_init(it));
#endif
weaponorder_byid = "";
for (int i = Weapons_MAX - 1; i >= 1; --i)
void Dump_Weapon_Settings()
{
int totalweapons = 0, totalsettings = 0;
- FOREACH(Weapons, it != WEP_Null, LAMBDA(
+ FOREACH(Weapons, it != WEP_Null, {
// step 1: clear the queue
WEP_CONFIG_COUNT = 0;
for (int x = 0; x <= MAX_WEP_CONFIG; ++x)
LOG_INFO(sprintf("#%d: %s: %d settings...\n", i, it.m_name, WEP_CONFIG_COUNT));
totalweapons += 1;
totalsettings += WEP_CONFIG_COUNT;
- ));
+ });
// clear queue now that we're finished
WEP_CONFIG_COUNT = 0;
REGISTER_MUTATOR(porto_ticker, true);
MUTATOR_HOOKFUNCTION(porto_ticker, SV_StartFrame) {
- FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(it.porto_forbidden = max(0, it.porto_forbidden - 1)));
+ FOREACH_CLIENT(IS_PLAYER(it), it.porto_forbidden = max(0, it.porto_forbidden - 1));
}
void W_Porto_Success()
}
self.nextthink = time;
dist_mult = WEP_CVAR(tuba, attenuation) / autocvar_snd_soundradius;
- FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != self.realowner, LAMBDA(
+ FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != self.realowner, {
v = self.origin - (it.origin + it.view_ofs);
vol0 = max(0, 1 - vlen(v) * dist_mult);
dir0 = normalize(v);
self.SendFlags |= 2;
break;
}
- ));
+ });
}
void W_Tuba_NoteOn(float hittype)
void UncustomizeEntitiesRun()
{
- FOREACH_ENTITY_FLOAT(uncustomizeentityforclient_set, true, LAMBDA(
- WITH(entity, self, it, it.uncustomizeentityforclient());
- ));
+ FOREACH_ENTITY_FLOAT(uncustomizeentityforclient_set, true, WITH(entity, self, it, it.uncustomizeentityforclient()));
}
STRING_ITERATOR(g_buf, string_null, 0);
string algo = "MD4"; \
string join = ":"; \
string s = ""; \
- FOREACH(id, true, LAMBDA(s = strcat(s, join, it.registered_id))); \
+ FOREACH(id, true, s = strcat(s, join, it.registered_id)); \
s = substring(s, strlen(join), -1); \
string h = REGISTRY_HASH(id) = strzone(digest_hex(algo, s)); \
LOG_TRACEF(#id ": %s\n[%s]\n", h, s); \
REGISTRY_CHECK(Stats)
STATIC_INIT(RegisterStats_renumber)
{
- FOREACH(Stats, true, LAMBDA(it.m_id = STATS_ENGINE_RESERVE + i));
+ FOREACH(Stats, true, it.m_id = STATS_ENGINE_RESERVE + i);
}
#ifdef SVQC
STATIC_INIT(stats_add) { stats_add(); }
#define IS_VEHICLE(v) (v.vehicle_flags & VHF_ISVEHICLE)
#define IS_TURRET(v) (v.turret_flags & TUR_FLAG_ISTURRET)
-// NOTE: FOR_EACH_CLIENTSLOT deprecated! Use the following instead: FOREACH_CLIENTSLOT(true, LAMBDA(yourcode));
-// NOTE: FOR_EACH_CLIENT deprecated! Use the following instead: FOREACH_CLIENT(true, LAMBDA(yourcode));
-// NOTE: FOR_EACH_REALCLIENT deprecated! Use the following instead: FOREACH_CLIENT(IS_REAL_CLIENT(it), LAMBDA(yourcode));
+// NOTE: FOR_EACH_CLIENTSLOT deprecated! Use the following instead: FOREACH_CLIENTSLOT(true, { code; });
+// NOTE: FOR_EACH_CLIENT deprecated! Use the following instead: FOREACH_CLIENT(true, { code; });
+// NOTE: FOR_EACH_REALCLIENT deprecated! Use the following instead: FOREACH_CLIENT(IS_REAL_CLIENT(it), { code; });
-// NOTE: FOR_EACH_PLAYER deprecated! Use the following instead: FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(yourcode));
-// NOTE: FOR_EACH_SPEC deprecated! Use the following instead: FOREACH_CLIENT(IS_SPEC(it), LAMBDA(yourcode));
-// NOTE: FOR_EACH_OBSERVER deprecated! Use the following instead: FOREACH_CLIENT(IS_OBSERVER(it), LAMBDA(yourcode));
-// NOTE: FOR_EACH_REALPLAYER deprecated! Use the following instead: FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it), LAMBDA(yourcode));
+// NOTE: FOR_EACH_PLAYER deprecated! Use the following instead: FOREACH_CLIENT(IS_PLAYER(it), { code; });
+// NOTE: FOR_EACH_SPEC deprecated! Use the following instead: FOREACH_CLIENT(IS_SPEC(it), { code; });
+// NOTE: FOR_EACH_OBSERVER deprecated! Use the following instead: FOREACH_CLIENT(IS_OBSERVER(it), { code; });
+// NOTE: FOR_EACH_REALPLAYER deprecated! Use the following instead: FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it), { code; });
#define FOREACH_CLIENTSLOT(cond, body) \
MACRO_BEGIN { \
#define FOREACH_CLIENT(cond, body) FOREACH_CLIENTSLOT(IS_CLIENT(it) && (cond), body)
-// NOTE: FOR_EACH_MONSTER deprecated! Use the following instead: FOREACH_ENTITY_FLAGS(flags, FL_MONSTER, LAMBDA(yourcode));
+// NOTE: FOR_EACH_MONSTER deprecated! Use the following instead: FOREACH_ENTITY_FLAGS(flags, FL_MONSTER, { code; });
#include <common/effects/all.qh>
#include <common/models/all.qh>