X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fw_common.qc;fp=qcsrc%2Fserver%2Fw_common.qc;h=a2de5dab04be64621a6742d0c024ac05aa69e79f;hp=2e0c1e8f02bbcd466773894e43e3da4df52104f5;hb=30e9db455abe691a3560555a989beb382b3b2531;hpb=58b8eafbf5e2ff9147477e115292246458c4c5eb diff --git a/qcsrc/server/w_common.qc b/qcsrc/server/w_common.qc index 2e0c1e8f02..a2de5dab04 100644 --- a/qcsrc/server/w_common.qc +++ b/qcsrc/server/w_common.qc @@ -11,8 +11,7 @@ void W_GiveWeapon (entity e, float wep) 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; @@ -105,7 +104,7 @@ void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, f // 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); @@ -445,7 +444,7 @@ void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, f 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 @@ -618,7 +617,7 @@ void W_PrepareExplosionByDamage(entity attacker, void() explode) 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;