]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_common.qc
Get rid of if not, step 1.
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_common.qc
index 2eca8c2cbbd03e64eaede7854ca99b2b7ad67b75..b9c37cc4d582da6e83a703a2a0f2caddc00d3a71 100644 (file)
@@ -354,8 +354,8 @@ void W_BallisticBullet_Touch (void)
        //   common/weapclip (intended)
        //   common/noimpact (is supposed to eat projectiles, but is erased farther above)
        if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NODRAW)
-       if not(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NONSOLID)
-       if not(trace_dphitcontents & DPCONTENTS_OPAQUE)
+       if (!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NONSOLID))
+       if (!(trace_dphitcontents & DPCONTENTS_OPAQUE))
        {
                remove(self);
                return;
@@ -444,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 not(IS_REAL_CLIENT(self))
+               if (!IS_REAL_CLIENT(self))
                        lag = 0;
                if(autocvar_g_antilag == 0 || self.cvar_cl_noantilag)
                        lag = 0; // only do hitscan, but no antilag
@@ -514,8 +514,8 @@ void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, f
                        //   common/weapclip (intended)
                        //   common/noimpact (is supposed to eat projectiles, but is erased farther above)
                        if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NODRAW)
-                       if not(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NONSOLID)
-                       if not(trace_dphitcontents & DPCONTENTS_OPAQUE)
+                       if (!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NONSOLID))
+                       if (!(trace_dphitcontents & DPCONTENTS_OPAQUE))
                                break;
 
                        // go through solid!
@@ -562,7 +562,7 @@ void fireBullet (vector start, vector dir, float spread, float damage, float for
 
        if (pointcontents (trace_endpos) != CONTENT_SKY)
        {
-               if not (trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
+               if (!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT))
                        Damage_DamageInfo(trace_endpos, damage, 0, 0, dir * max(1, force), dtype, trace_ent.species, self);                    
 
                Damage (trace_ent, self, self, damage, dtype, trace_endpos, dir * force);
@@ -593,14 +593,14 @@ float W_CheckProjectileDamage(entity inflictor, entity projowner, float deathtyp
        {
                if(is_from_exception)
                        return (exception); // if exception is detected, allow it to override
-               else if not(is_from_contents)
+               else if (!is_from_contents)
                        return FALSE; // otherwise, only allow damage from contents
        }       
        else if(autocvar_g_projectiles_damage == 1)
        {
                if(is_from_exception)
                        return (exception); // if exception is detected, allow it to override
-               else if not(is_from_contents || is_from_owner)
+               else if (!(is_from_contents || is_from_owner))
                        return FALSE; // otherwise, only allow self damage and damage from contents
        }
        else if(autocvar_g_projectiles_damage == 2) // allow any damage, but override for exceptions