RemoveGrapplingHook(targ);
- entity head;
- FOR_EACH_PLAYER(head)
- if(head.hook.aiment == targ)
- RemoveGrapplingHook(head);
+ FOREACH_CLIENT(IS_PLAYER(it) && it.hook.aiment == targ, LAMBDA(RemoveGrapplingHook(it)));
// add waypoint
if(show_waypoint)
if(targ.frozen && targ.frozen != 3) // only reset health if target was frozen
targ.health = ((IS_PLAYER(targ)) ? start_health : targ.max_health);
- entity head;
targ.frozen = 0;
targ.revive_progress = 0;
targ.revival_time = time;
WaypointSprite_Kill(targ.waypointsprite_attached);
- FOR_EACH_PLAYER(head)
- if(head.hook.aiment == targ)
- RemoveGrapplingHook(head);
+ FOREACH_CLIENT(IS_PLAYER(it) && it.hook.aiment == targ, LAMBDA(RemoveGrapplingHook(it)));
// remove the ice block
if(targ.iceblock)
}
e.fire_hitsound = true;
- if (!IS_INDEPENDENT_PLAYER(e))
+ if(!IS_INDEPENDENT_PLAYER(e))
if(!e.frozen)
- FOR_EACH_PLAYER(other) if(e != other)
- {
- if(IS_PLAYER(other))
- if(other.deadflag == DEAD_NO)
- if (!IS_INDEPENDENT_PLAYER(other))
- if(boxesoverlap(e.absmin, e.absmax, other.absmin, other.absmax))
- {
- t = autocvar_g_balance_firetransfer_time * (e.fire_endtime - time);
- d = autocvar_g_balance_firetransfer_damage * e.fire_damagepersec * t;
- Fire_AddDamage(other, o, d, t, DEATH_FIRE.m_id);
- }
- }
+ FOREACH_CLIENT(IS_PLAYER(it) && it != e, LAMBDA(
+ if(it.deadflag == DEAD_NO)
+ if(!IS_INDEPENDENT_PLAYER(it))
+ if(boxesoverlap(e.absmin, e.absmax, it.absmin, it.absmax))
+ {
+ t = autocvar_g_balance_firetransfer_time * (e.fire_endtime - time);
+ d = autocvar_g_balance_firetransfer_damage * e.fire_damagepersec * t;
+ Fire_AddDamage(it, o, d, t, DEATH_FIRE.m_id);
+ }
+ ));
}
void Fire_ApplyEffect(entity e)
*/
void tracebox_antilag_force_wz (entity source, vector v1, vector mi, vector ma, vector v2, float nomonst, entity forent, float lag, float wz)
{
- entity player;
- float oldsolid;
-
// check whether antilagged traces are enabled
if (lag < 0.001)
lag = 0;
lag = 0; // only antilag for clients
// change shooter to SOLID_BBOX so the shot can hit corpses
- oldsolid = source.dphitcontentsmask;
+ int oldsolid = source.dphitcontentsmask;
if(source)
source.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE;
if (lag)
{
// take players back into the past
- FOR_EACH_PLAYER(player)
- if(player != forent)
- antilag_takeback(player, time - lag);
- FOR_EACH_MONSTER(player)
- antilag_takeback(player, time - lag);
+ FOREACH_CLIENT(IS_PLAYER(it) && it != forent, LAMBDA(antilag_takeback(it, time - lag)));
+ FOREACH_ENTITY_FLAGS(flags, FL_MONSTER, LAMBDA(
+ if(it != forent)
+ antilag_takeback(it, time - lag);
+ ));
}
// do the trace
// restore players to current positions
if (lag)
{
- FOR_EACH_PLAYER(player)
- if(player != forent)
- antilag_restore(player);
- FOR_EACH_MONSTER(player)
- antilag_restore(player);
+ FOREACH_CLIENT(IS_PLAYER(it) && it != forent, LAMBDA(antilag_restore(it)));
+ FOREACH_ENTITY_FLAGS(flags, FL_MONSTER, LAMBDA(
+ if(it != forent)
+ antilag_restore(it);
+ ));
}
// restore shooter solid type