oldself = self;
self = e;
- if not(g_minstagib)
- if(other.classname == "player")
+ if(IS_PLAYER(other))
{ Send_Notification(NOTIF_ONE, other, MSG_MULTI, ITEM_WEAPON_GOT, wep); }
self = oldself;
// Find all non-hit players the beam passed close by
if(deathtype == WEP_MINSTANEX || deathtype == WEP_NEX)
{
- FOR_EACH_REALCLIENT(msg_entity) if(msg_entity != self) if(!msg_entity.railgunhit) if not(msg_entity.classname == "spectator" && msg_entity.enemy == self) // we use realclient, so spectators can hear the whoosh too
+ FOR_EACH_REALCLIENT(msg_entity) if(msg_entity != self) if(!msg_entity.railgunhit) if not(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);
lag = ANTILAG_LATENCY(self);
if(lag < 0.001)
lag = 0;
- if(clienttype(self) != CLIENTTYPE_REAL)
+ if not(IS_REAL_CLIENT(self))
lag = 0;
if(autocvar_g_antilag == 0 || self.cvar_cl_noantilag)
lag = 0; // only do hitscan, but no antilag
self.takedamage = DAMAGE_NO;
self.event_damage = func_null;
- if((attacker.flags & FL_CLIENT) && !autocvar_g_projectiles_keep_owner)
+ if(IS_CLIENT(attacker) && !autocvar_g_projectiles_keep_owner)
{
self.owner = attacker;
self.realowner = attacker;