- FOR_EACH_REALCLIENT(msg_entity)
- if(msg_entity != self)
- if(!msg_entity.railgunhit)
- if(!(IS_SPEC(msg_entity) && msg_entity.enemy == self)) // we use realclient, so spectators can hear the whoosh too
- {
- // nearest point on the beam
- beampos = start + dir * bound(0, (msg_entity.origin - start) * dir, length);
+ FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != self, LAMBDA(
+ if(!it.railgunhit)
+ if(!(IS_SPEC(it) && it.enemy == self))
+ {
+ msg_entity = it;
+ // nearest point on the beam
+ beampos = start + dir * bound(0, (msg_entity.origin - start) * dir, length);