From 46a44942030ee6350c6847bf0efe75a1e0d54c6b Mon Sep 17 00:00:00 2001 From: TimePath Date: Sun, 13 Mar 2016 19:12:44 +1100 Subject: [PATCH] Remove uses of LAMBDA(), not handled well by uncrustify --- qcsrc/client/commands/cl_cmd.qc | 12 ++--- qcsrc/client/commands/cl_cmd.qh | 2 +- qcsrc/client/hud/panel/radar.qc | 12 ++--- qcsrc/client/hud/panel/weapons.qc | 6 +-- qcsrc/client/main.qc | 8 +-- qcsrc/client/scoreboard.qc | 8 +-- qcsrc/client/shownames.qc | 8 +-- qcsrc/client/view.qc | 10 ++-- qcsrc/common/animdecide.qc | 11 ++--- qcsrc/common/command/all.qh | 2 +- qcsrc/common/command/generic.qc | 12 ++--- qcsrc/common/debug.qh | 8 +-- qcsrc/common/effects/all.qc | 6 +-- qcsrc/common/effects/qc/gibs.qc | 2 +- qcsrc/common/effects/qc/globalsound.qc | 16 +++--- qcsrc/common/effects/qc/globalsound.qh | 6 +-- qcsrc/common/ent_cs.qc | 4 +- .../gamemodes/gamemode/onslaught/onslaught.qc | 28 +++++------ qcsrc/common/impulses/all.qh | 2 +- qcsrc/common/items/all.qc | 4 +- qcsrc/common/items/all.qh | 2 +- qcsrc/common/items/inventory.qh | 12 ++--- qcsrc/common/mapinfo.qc | 24 +++++---- qcsrc/common/minigames/cl_minigames_hud.qc | 8 ++- qcsrc/common/minigames/minigames.qc | 8 +-- qcsrc/common/minigames/sv_minigames.qc | 5 +- qcsrc/common/models/all.qh | 4 +- qcsrc/common/mutators/base.qh | 6 +-- qcsrc/common/net_notice.qc | 8 +-- qcsrc/common/notifications/all.qh | 2 +- qcsrc/common/playerstats.qc | 14 +++--- qcsrc/common/sounds/all.qc | 2 +- qcsrc/common/sounds/all.qh | 4 +- qcsrc/common/t_items.qc | 49 ++++++++----------- qcsrc/common/triggers/target/changelevel.qc | 4 +- qcsrc/common/triggers/target/music.qc | 10 ++-- qcsrc/common/triggers/trigger/teleport.qc | 2 +- qcsrc/common/turrets/config.qc | 4 +- qcsrc/common/turrets/sv_turrets.qc | 4 +- qcsrc/common/vehicles/sv_vehicles.qc | 4 +- qcsrc/common/weapons/all.qc | 6 +-- qcsrc/common/weapons/all.qh | 8 +-- qcsrc/common/weapons/config.qc | 4 +- qcsrc/common/weapons/weapon/porto.qc | 2 +- qcsrc/common/weapons/weapon/tuba.qc | 4 +- qcsrc/lib/net.qh | 4 +- qcsrc/lib/registry.qh | 2 +- qcsrc/lib/stats.qh | 2 +- qcsrc/server/_all.qh | 16 +++--- 49 files changed, 178 insertions(+), 213 deletions(-) diff --git a/qcsrc/client/commands/cl_cmd.qc b/qcsrc/client/commands/cl_cmd.qc index 5e4013973..b512ba53a 100644 --- a/qcsrc/client/commands/cl_cmd.qc +++ b/qcsrc/client/commands/cl_cmd.qc @@ -472,32 +472,32 @@ CLIENT_COMMAND(sendcvar, "Send a cvar to the server (like weaponpriority)") { Lo 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)); } diff --git a/qcsrc/client/commands/cl_cmd.qh b/qcsrc/client/commands/cl_cmd.qh index 23d72ff60..d53d1b6a6 100644 --- a/qcsrc/client/commands/cl_cmd.qh +++ b/qcsrc/client/commands/cl_cmd.qh @@ -21,7 +21,7 @@ REGISTRY_SORT(CLIENT_COMMANDS) 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 diff --git a/qcsrc/client/hud/panel/radar.qc b/qcsrc/client/hud/panel/radar.qc index 4e4f90126..b4986e5e3 100644 --- a/qcsrc/client/hud/panel/radar.qc +++ b/qcsrc/client/hud/panel/radar.qc @@ -332,11 +332,9 @@ void HUD_Radar() 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 ) @@ -353,13 +351,13 @@ void HUD_Radar() } 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(); diff --git a/qcsrc/client/hud/panel/weapons.qc b/qcsrc/client/hud/panel/weapons.qc index 19cfb551c..6e9f13dac 100644 --- a/qcsrc/client/hud/panel/weapons.qc +++ b/qcsrc/client/hud/panel/weapons.qc @@ -76,7 +76,7 @@ void HUD_Weapons() 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); @@ -131,10 +131,10 @@ void HUD_Weapons() // 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; diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index 0d195fbdf..7fbdd9d18 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -834,13 +834,13 @@ void CSQC_Ent_Update(bool isnew) #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) { @@ -924,11 +924,11 @@ bool CSQC_Parse_TempEntity() // 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); diff --git a/qcsrc/client/scoreboard.qc b/qcsrc/client/scoreboard.qc index cd8df72f6..3204af9f0 100644 --- a/qcsrc/client/scoreboard.qc +++ b/qcsrc/client/scoreboard.qc @@ -1001,13 +1001,13 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size) 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; @@ -1061,7 +1061,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size) 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; @@ -1100,7 +1100,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size) pos.y += height; } ++column; - )); + }); if (weapons_with_stats) average_accuracy = floor((average_accuracy * 100 / weapons_with_stats) + 0.5); diff --git a/qcsrc/client/shownames.qc b/qcsrc/client/shownames.qc index 7ed13b3e9..fc36c4727 100644 --- a/qcsrc/client/shownames.qc +++ b/qcsrc/client/shownames.qc @@ -53,7 +53,7 @@ void Draw_ShowNames(entity this) 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; @@ -63,7 +63,7 @@ void Draw_ShowNames(entity this) 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) @@ -167,7 +167,7 @@ void Draw_ShowNames(entity this) 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) { @@ -194,5 +194,5 @@ void Draw_ShowNames_All() if (!it.csqcmodel_isdead) setorigin(it, entcs.origin); it.csqcmodel_isdead = dead; Draw_ShowNames(it); - )); + }); } diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index b374403db..c1786f41f 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -1414,7 +1414,7 @@ void CSQC_UpdateView(float w, float h) 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; } @@ -1460,10 +1460,10 @@ void CSQC_UpdateView(float w, float h) 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 } @@ -1829,7 +1829,7 @@ void CSQC_UpdateView(float w, float h) 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(); @@ -2159,7 +2159,7 @@ void CSQC_UpdateView(float w, float h) } else */ // draw 2D entities - FOREACH_ENTITY(it.draw2d, LAMBDA(it.draw2d(it))); + FOREACH_ENTITY(it.draw2d, it.draw2d(it)); Draw_ShowNames_All(); Debug_Draw(); diff --git a/qcsrc/common/animdecide.qc b/qcsrc/common/animdecide.qc index 76921d662..f5adbe7b7 100644 --- a/qcsrc/common/animdecide.qc +++ b/qcsrc/common/animdecide.qc @@ -10,13 +10,10 @@ 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; } diff --git a/qcsrc/common/command/all.qh b/qcsrc/common/command/all.qh index efe9f7268..9bbce5e14 100644 --- a/qcsrc/common/command/all.qh +++ b/qcsrc/common/command/all.qh @@ -16,7 +16,7 @@ REGISTRY_SORT(GENERIC_COMMANDS) 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" diff --git a/qcsrc/common/command/generic.qc b/qcsrc/common/command/generic.qc index 7bfd0ff7d..50cc49076 100644 --- a/qcsrc/common/command/generic.qc +++ b/qcsrc/common/command/generic.qc @@ -537,32 +537,32 @@ GENERIC_COMMAND(runtest, "Run unit tests") { GenericCommand_runtest(request, arg 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)); } diff --git a/qcsrc/common/debug.qh b/qcsrc/common/debug.qh index eb77d7bce..113019a7c 100644 --- a/qcsrc/common/debug.qh +++ b/qcsrc/common/debug.qh @@ -66,7 +66,7 @@ bool autocvar_debugdraw; 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, { @@ -144,7 +144,7 @@ bool autocvar_debugdraw; sz * '1 1 0', rgb, 0.5, DRAWFLAG_NORMAL); ++ofs; }); - )); + }); } #endif @@ -280,7 +280,7 @@ GENERIC_COMMAND(find, "Search through entities for matching classname") { 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; } @@ -304,7 +304,7 @@ GENERIC_COMMAND(findat, "Search through entities for matching origin") 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; } diff --git a/qcsrc/common/effects/all.qc b/qcsrc/common/effects/all.qc index a07228fbd..73f1fe65f 100644 --- a/qcsrc/common/effects/all.qc +++ b/qcsrc/common/effects/all.qc @@ -75,17 +75,17 @@ void Send_Effect(entity eff, vector eff_loc, vector eff_vel, int eff_cnt) 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); } diff --git a/qcsrc/common/effects/qc/gibs.qc b/qcsrc/common/effects/qc/gibs.qc index 3d0da1b35..aec664035 100644 --- a/qcsrc/common/effects/qc/gibs.qc +++ b/qcsrc/common/effects/qc/gibs.qc @@ -43,7 +43,7 @@ void Violence_GibSplash_At(vector org, vector dir, float type, float amount, ent 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); } diff --git a/qcsrc/common/effects/qc/globalsound.qc b/qcsrc/common/effects/qc/globalsound.qc index f13b23104..ae1ec7485 100644 --- a/qcsrc/common/effects/qc/globalsound.qc +++ b/qcsrc/common/effects/qc/globalsound.qc @@ -192,22 +192,20 @@ 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)); } @@ -369,10 +367,10 @@ 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; @@ -408,10 +406,10 @@ } else { - FOREACH_CLIENT(IS_REAL_CLIENT(it), LAMBDA( + FOREACH_CLIENT(IS_REAL_CLIENT(it), { msg_entity = it; X(); - )); + }); } #undef X break; diff --git a/qcsrc/common/effects/qc/globalsound.qh b/qcsrc/common/effects/qc/globalsound.qh index 7cb8fdb3e..64ef524ec 100644 --- a/qcsrc/common/effects/qc/globalsound.qh +++ b/qcsrc/common/effects/qc/globalsound.qh @@ -19,7 +19,7 @@ REGISTER_REGISTRY(PlayerSounds) 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) @@ -90,13 +90,13 @@ REGISTER_REGISTRY(GlobalSounds) 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") diff --git a/qcsrc/common/ent_cs.qc b/qcsrc/common/ent_cs.qc index 165d94b89..148d3883f 100644 --- a/qcsrc/common/ent_cs.qc +++ b/qcsrc/common/ent_cs.qc @@ -109,10 +109,10 @@ 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) diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc b/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc index 2ce3cf582..0b030b251 100644 --- a/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc +++ b/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc @@ -571,7 +571,7 @@ void ons_ControlPoint_Icon_Think() 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)) @@ -579,7 +579,7 @@ void ons_ControlPoint_Icon_Think() 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); @@ -976,7 +976,7 @@ void ons_GeneratorDamage(entity this, entity inflictor, entity attacker, float d 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)); } } @@ -1043,7 +1043,7 @@ void ons_GeneratorThink() 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); @@ -1051,7 +1051,7 @@ void ons_GeneratorThink() } else Send_Notification(NOTIF_ONE, it, MSG_CENTER, APP_TEAM_NUM(self.team, CENTER_ONS_NOTSHIELDED)); - )); + }); } } } @@ -1270,12 +1270,12 @@ bool Onslaught_CheckWinner() 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; } @@ -1288,7 +1288,7 @@ bool Onslaught_CheckPlayers() 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; @@ -1316,11 +1316,11 @@ void havocbot_goalrating_ons_offenseitems(float ratingscale, vector org, float s // 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; @@ -1397,12 +1397,12 @@ void havocbot_goalrating_ons_controlpoints_attack(float ratingscale) // 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; @@ -1772,11 +1772,11 @@ bool ons_Teleport(entity player, entity tele_target, float range, bool tele_effe 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; } diff --git a/qcsrc/common/impulses/all.qh b/qcsrc/common/impulses/all.qh index 433f2318d..6780ac16d 100644 --- a/qcsrc/common/impulses/all.qh +++ b/qcsrc/common/impulses/all.qh @@ -6,7 +6,7 @@ REGISTER_REGISTRY(IMPULSES) 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) diff --git a/qcsrc/common/items/all.qc b/qcsrc/common/items/all.qc index 927b2ece2..62dc0fe27 100644 --- a/qcsrc/common/items/all.qc +++ b/qcsrc/common/items/all.qc @@ -6,9 +6,7 @@ void Dump_Items() { - FOREACH(Items, true, LAMBDA( - ITEM_HANDLE(Show, it); - )); + FOREACH(Items, true, ITEM_HANDLE(Show, it)); } string Item_Model(string item_mdl) diff --git a/qcsrc/common/items/all.qh b/qcsrc/common/items/all.qh index 1bd22f660..eea1de9a4 100644 --- a/qcsrc/common/items/all.qh +++ b/qcsrc/common/items/all.qh @@ -13,7 +13,7 @@ REGISTER_REGISTRY(Items) 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(); diff --git a/qcsrc/common/items/inventory.qh b/qcsrc/common/items/inventory.qh index 8f2f05fd1..7780a0054 100644 --- a/qcsrc/common/items/inventory.qh +++ b/qcsrc/common/items/inventory.qh @@ -18,12 +18,12 @@ NET_HANDLE(ENT_CLIENT_INVENTORY, bool isnew) { 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 @@ -32,14 +32,14 @@ NET_HANDLE(ENT_CLIENT_INVENTORY, bool isnew) 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 diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index d853eeac3..447e7730e 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -597,13 +597,13 @@ void _MapInfo_Map_ApplyGametype(string s, int pWantedType, int pThisType, int lo 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; } @@ -618,7 +618,7 @@ void _MapInfo_Map_ApplyGametypeEx(string s, int pWantedType, int pThisType) 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; @@ -666,7 +666,7 @@ void _MapInfo_Map_ApplyGametypeEx(string s, int pWantedType, int pThisType) 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); } @@ -685,7 +685,7 @@ void _MapInfo_Map_ApplyGametypeEx(string s, int pWantedType, int pThisType) Gametype MapInfo_Type(int t) { - FOREACH(Gametypes, it.items == t, LAMBDA(return it)); + FOREACH(Gametypes, it.items == t, return it); return NULL; } @@ -705,14 +705,14 @@ int MapInfo_Type_FromString(string t) 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 ""; } @@ -720,13 +720,13 @@ string MapInfo_Type_ToString(float t) { 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"); } @@ -1236,7 +1236,7 @@ int MapInfo_CurrentFeatures() 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; } @@ -1262,9 +1262,7 @@ float MapInfo_CheckMap(string s) // returns 0 if the map can't be played with th 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) diff --git a/qcsrc/common/minigames/cl_minigames_hud.qc b/qcsrc/common/minigames/cl_minigames_hud.qc index 8b4f9234d..50fd2bab5 100644 --- a/qcsrc/common/minigames/cl_minigames_hud.qc +++ b/qcsrc/common/minigames/cl_minigames_hud.qc @@ -213,15 +213,13 @@ void HUD_MinigameMenu_ClickCreate() { 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; - })); + }); } } diff --git a/qcsrc/common/minigames/minigames.qc b/qcsrc/common/minigames/minigames.qc index 2a632339c..71cf41a3a 100644 --- a/qcsrc/common/minigames/minigames.qc +++ b/qcsrc/common/minigames/minigames.qc @@ -4,12 +4,8 @@ REGISTER_NET_LINKED(ENT_CLIENT_MINIGAME) 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 diff --git a/qcsrc/common/minigames/sv_minigames.qc b/qcsrc/common/minigames/sv_minigames.qc index ca111e6c8..7c19c43dd 100644 --- a/qcsrc/common/minigames/sv_minigames.qc +++ b/qcsrc/common/minigames/sv_minigames.qc @@ -337,10 +337,7 @@ void ClientCommand_minigame(int request, int argc, string command) } 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" ) diff --git a/qcsrc/common/models/all.qh b/qcsrc/common/models/all.qh index ac95c2c84..e96031776 100644 --- a/qcsrc/common/models/all.qh +++ b/qcsrc/common/models/all.qh @@ -12,9 +12,7 @@ REGISTER_REGISTRY(Models) 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"); diff --git a/qcsrc/common/mutators/base.qh b/qcsrc/common/mutators/base.qh index b5265ec0c..79cba7f92 100644 --- a/qcsrc/common/mutators/base.qh +++ b/qcsrc/common/mutators/base.qh @@ -184,7 +184,7 @@ void NET_Mutator_Remove(entity this) { 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) @@ -198,7 +198,7 @@ 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); } @@ -278,7 +278,7 @@ STATIC_INIT(Mutators) { } 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) diff --git a/qcsrc/common/net_notice.qc b/qcsrc/common/net_notice.qc index fa98b2feb..d67a1de3d 100644 --- a/qcsrc/common/net_notice.qc +++ b/qcsrc/common/net_notice.qc @@ -30,7 +30,7 @@ void sv_notice_to(entity _to, string _notice, float _howlong, float _modal) 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 @@ -58,7 +58,7 @@ void cl_notice_read() 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; @@ -78,10 +78,10 @@ void cl_notice_run() #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 } diff --git a/qcsrc/common/notifications/all.qh b/qcsrc/common/notifications/all.qh index ffadf6ec1..8f00087c0 100644 --- a/qcsrc/common/notifications/all.qh +++ b/qcsrc/common/notifications/all.qh @@ -662,7 +662,7 @@ string notif_arg_spree_inf(float type, string input, string player, float spree) 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; diff --git a/qcsrc/common/playerstats.qc b/qcsrc/common/playerstats.qc index 3d10ca8b5..233762202 100644 --- a/qcsrc/common/playerstats.qc +++ b/qcsrc/common/playerstats.qc @@ -108,13 +108,13 @@ void PlayerStats_GameReport_Accuracy(entity p) { #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 } @@ -163,7 +163,7 @@ void PlayerStats_GameReport(float finished) 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); @@ -189,7 +189,7 @@ void PlayerStats_GameReport(float finished) // collect final player information PlayerStats_GameReport_FinalizePlayer(it); - )); + }); if(autocvar_g_playerstats_gamereport_uri != "") { @@ -231,13 +231,13 @@ void PlayerStats_GameReport_Init() // initiated before InitGameplayMode so that 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); @@ -457,7 +457,7 @@ void PlayerStats_PlayerBasic(entity joiningplayer, float newrequest) 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); } } } diff --git a/qcsrc/common/sounds/all.qc b/qcsrc/common/sounds/all.qc index c5685df3a..751462498 100644 --- a/qcsrc/common/sounds/all.qc +++ b/qcsrc/common/sounds/all.qc @@ -128,7 +128,7 @@ float spamsound(entity e, int chan, string samp, float vol, float _atten) 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) diff --git a/qcsrc/common/sounds/all.qh b/qcsrc/common/sounds/all.qh index 02098e875..a7fe25f17 100644 --- a/qcsrc/common/sounds/all.qh +++ b/qcsrc/common/sounds/all.qh @@ -15,9 +15,7 @@ REGISTER_REGISTRY(Sounds) #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"); diff --git a/qcsrc/common/t_items.qc b/qcsrc/common/t_items.qc index 1d3ce373d..e2bafb82f 100644 --- a/qcsrc/common/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -555,13 +555,13 @@ void Item_RespawnCountdown () 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); @@ -698,13 +698,13 @@ float Item_GiveTo(entity item, entity player) 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); } - )); + }); } } @@ -972,7 +972,7 @@ float commodity_pickupevalfunc(entity player, entity item) c = 0; // Detect needed ammo - FOREACH(Weapons, it != WEP_Null, LAMBDA( + FOREACH(Weapons, it != WEP_Null, { if(!(player.weapons & (it.m_wepset))) continue; @@ -988,7 +988,7 @@ float commodity_pickupevalfunc(entity player, entity item) 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... @@ -1478,7 +1478,7 @@ spawnfunc(target_items) 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) { @@ -1487,7 +1487,7 @@ spawnfunc(target_items) it.wr_init(it); break; } - )); + }); } } @@ -1534,7 +1534,7 @@ spawnfunc(target_items) 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"); @@ -1542,13 +1542,10 @@ spawnfunc(target_items) 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; + }); } } @@ -1709,10 +1706,7 @@ float GiveItems(entity e, float beginarg, float endarg) 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); @@ -1771,13 +1765,10 @@ float GiveItems(entity e, float beginarg, float endarg) 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; @@ -1788,12 +1779,12 @@ float GiveItems(entity e, float beginarg, float endarg) 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); diff --git a/qcsrc/common/triggers/target/changelevel.qc b/qcsrc/common/triggers/target/changelevel.qc index dc227f176..69f444073 100644 --- a/qcsrc/common/triggers/target/changelevel.qc +++ b/qcsrc/common/triggers/target/changelevel.qc @@ -16,11 +16,11 @@ void target_changelevel_use() 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; } diff --git a/qcsrc/common/triggers/target/music.qc b/qcsrc/common/triggers/target/music.qc index 3e0cca2a7..52f1fca0e 100644 --- a/qcsrc/common/triggers/target/music.qc +++ b/qcsrc/common/triggers/target/music.qc @@ -54,10 +54,10 @@ void target_music_use() 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) { @@ -168,7 +168,7 @@ void TargetMusic_Advance() 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) { @@ -189,7 +189,7 @@ void TargetMusic_Advance() _sound(it, CH_BGM_SINGLE, "", vol, ATTEN_NONE); it.lastvol = vol; } - )); + }); music_trigger = world; bgmtime = (best) ? getsoundtime(best, CH_BGM_SINGLE) : gettime(GETTIME_CDTRACK); } @@ -210,7 +210,7 @@ void Net_TargetMusic() 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)); diff --git a/qcsrc/common/triggers/trigger/teleport.qc b/qcsrc/common/triggers/trigger/teleport.qc index 3b4dbb489..be8040079 100644 --- a/qcsrc/common/triggers/trigger/teleport.qc +++ b/qcsrc/common/triggers/trigger/teleport.qc @@ -88,7 +88,7 @@ spawnfunc(trigger_teleport) 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); diff --git a/qcsrc/common/turrets/config.qc b/qcsrc/common/turrets/config.qc index 34cf50eac..022e73c5e 100644 --- a/qcsrc/common/turrets/config.qc +++ b/qcsrc/common/turrets/config.qc @@ -28,7 +28,7 @@ float T_Config_Queue_Compare(float root, float child, entity pass) 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) @@ -49,7 +49,7 @@ void Dump_Turret_Settings() // 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; diff --git a/qcsrc/common/turrets/sv_turrets.qc b/qcsrc/common/turrets/sv_turrets.qc index a06fbcbb9..fec1e885f 100644 --- a/qcsrc/common/turrets/sv_turrets.qc +++ b/qcsrc/common/turrets/sv_turrets.qc @@ -1206,11 +1206,11 @@ void turrets_manager_think() 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"); } } diff --git a/qcsrc/common/vehicles/sv_vehicles.qc b/qcsrc/common/vehicles/sv_vehicles.qc index 9ee9d1dc4..3e75ae530 100644 --- a/qcsrc/common/vehicles/sv_vehicles.qc +++ b/qcsrc/common/vehicles/sv_vehicles.qc @@ -1007,7 +1007,7 @@ void vehicles_enter(entity pl, entity veh) 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); @@ -1164,7 +1164,7 @@ void vehicles_spawn() 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(); diff --git a/qcsrc/common/weapons/all.qc b/qcsrc/common/weapons/all.qc index def5003c6..b126005eb 100644 --- a/qcsrc/common/weapons/all.qc +++ b/qcsrc/common/weapons/all.qc @@ -134,7 +134,7 @@ string W_NumberWeaponOrder_MapFunc(string s) { 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) @@ -202,10 +202,10 @@ void W_RandomWeapons(entity e, float n) 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); diff --git a/qcsrc/common/weapons/all.qh b/qcsrc/common/weapons/all.qh index 0e1b5439f..5e87a3c3a 100644 --- a/qcsrc/common/weapons/all.qh +++ b/qcsrc/common/weapons/all.qh @@ -33,7 +33,7 @@ WepSet ReadWepSet(); 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) @@ -298,7 +298,7 @@ REGISTRY_CHECK(Weapons) 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; @@ -309,9 +309,9 @@ STATIC_INIT(register_weapons_done) 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) diff --git a/qcsrc/common/weapons/config.qc b/qcsrc/common/weapons/config.qc index ad90baa6f..34031a208 100644 --- a/qcsrc/common/weapons/config.qc +++ b/qcsrc/common/weapons/config.qc @@ -25,7 +25,7 @@ float W_Config_Queue_Compare(int root, int child, entity pass) 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) @@ -51,7 +51,7 @@ void Dump_Weapon_Settings() 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; diff --git a/qcsrc/common/weapons/weapon/porto.qc b/qcsrc/common/weapons/weapon/porto.qc index be4387347..0e667419d 100644 --- a/qcsrc/common/weapons/weapon/porto.qc +++ b/qcsrc/common/weapons/weapon/porto.qc @@ -50,7 +50,7 @@ spawnfunc(weapon_porto) { weapon_defaultspawnfunc(this, WEP_PORTO); } 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() diff --git a/qcsrc/common/weapons/weapon/tuba.qc b/qcsrc/common/weapons/weapon/tuba.qc index 24b2f6998..593af8518 100644 --- a/qcsrc/common/weapons/weapon/tuba.qc +++ b/qcsrc/common/weapons/weapon/tuba.qc @@ -287,7 +287,7 @@ void W_Tuba_NoteThink() } 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); @@ -306,7 +306,7 @@ void W_Tuba_NoteThink() self.SendFlags |= 2; break; } - )); + }); } void W_Tuba_NoteOn(float hittype) diff --git a/qcsrc/lib/net.qh b/qcsrc/lib/net.qh index 7ac732f8b..b364ced54 100644 --- a/qcsrc/lib/net.qh +++ b/qcsrc/lib/net.qh @@ -145,9 +145,7 @@ STATIC_INIT(C2S_Protocol_renumber) { FOREACH(C2S_Protocol, true, it.m_id = i); } 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); diff --git a/qcsrc/lib/registry.qh b/qcsrc/lib/registry.qh index fb6cb80e8..434473a86 100644 --- a/qcsrc/lib/registry.qh +++ b/qcsrc/lib/registry.qh @@ -158,7 +158,7 @@ void Registry_send(string id, string hash); 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); \ diff --git a/qcsrc/lib/stats.qh b/qcsrc/lib/stats.qh index ea7671a1c..2d10d9c46 100644 --- a/qcsrc/lib/stats.qh +++ b/qcsrc/lib/stats.qh @@ -107,7 +107,7 @@ REGISTRY_SORT(Stats) 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(); } diff --git a/qcsrc/server/_all.qh b/qcsrc/server/_all.qh index 47a562fe7..6a78f5320 100644 --- a/qcsrc/server/_all.qh +++ b/qcsrc/server/_all.qh @@ -20,14 +20,14 @@ const string STR_OBSERVER = "observer"; #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 { \ @@ -41,7 +41,7 @@ const string STR_OBSERVER = "observer"; #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 #include -- 2.39.2