if(fire & 2)
if(PS(actor).m_switchweapon == WEP_DEVASTATOR)
{
- entity rock;
bool rockfound = false;
- for(rock = NULL; (rock = find(rock, classname, "rocket")); ) if(rock.realowner == actor)
+ IL_EACH(g_projectiles, it.realowner == actor && it.classname == "rocket",
{
- if(!rock.rl_detonate_later)
+ if(!it.rl_detonate_later)
{
- rock.rl_detonate_later = true;
+ it.rl_detonate_later = true;
rockfound = true;
}
- }
+ });
if(rockfound)
sound(actor, CH_WEAPON_B, SND_ROCKET_DET, VOL_BASE, ATTN_NORM);
}
if(WEP_CVAR_SEC(mortar, remote_detonateprimary))
{
bool nadefound = false;
- entity nade;
- for(nade = NULL; (nade = find(nade, classname, "grenade")); ) if(nade.realowner == actor)
+ IL_EACH(g_projectiles, it.realowner == actor && it.classname == "grenade",
{
- if(!nade.gl_detonate_later)
+ if(!it.gl_detonate_later)
{
- nade.gl_detonate_later = true;
+ it.gl_detonate_later = true;
nadefound = true;
}
- }
+ });
if(nadefound)
sound(actor, CH_WEAPON_B, SND_ROCKET_DET, VOL_BASE, ATTN_NORM);
}
local float cyc;
// look for info_intermission first
- spot = find (NULL, classname, "info_intermission");
+ spot = find(NULL, classname, "info_intermission");
if (spot)
{ // pick a random one
cyc = random() * 4;
while (cyc > 1)
{
- spot = find (spot, classname, "info_intermission");
+ spot = find(spot, classname, "info_intermission");
if (!spot)
- spot = find (spot, classname, "info_intermission");
+ spot = find(spot, classname, "info_intermission");
cyc = cyc - 1;
}
return spot;
}
// then look for the start position
- spot = find (NULL, classname, "info_player_start");
+ spot = find(NULL, classname, "info_player_start");
if (spot)
return spot;
// testinfo_player_start is only found in regioned levels
- spot = find (NULL, classname, "testplayerstart");
+ spot = find(NULL, classname, "testplayerstart");
if (spot)
return spot;
// then look for the start position
- spot = find (NULL, classname, "info_player_deathmatch");
+ spot = find(NULL, classname, "info_player_deathmatch");
if (spot)
return spot;