]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove "if not"
authorMario <mario.mario@y7mail.com>
Mon, 9 Dec 2013 00:20:51 +0000 (11:20 +1100)
committerMario <mario.mario@y7mail.com>
Mon, 9 Dec 2013 00:20:51 +0000 (11:20 +1100)
15 files changed:
qcsrc/client/particles.qc
qcsrc/common/weapons/w_arc.qc
qcsrc/common/weapons/w_crylink.qc
qcsrc/common/weapons/w_devastator.qc
qcsrc/common/weapons/w_hagar.qc
qcsrc/common/weapons/w_hlac.qc
qcsrc/common/weapons/w_hook.qc
qcsrc/common/weapons/w_machinegun.qc
qcsrc/common/weapons/w_minelayer.qc
qcsrc/common/weapons/w_nex.qc
qcsrc/common/weapons/w_shockwave.qc
qcsrc/server/weapons/common.qc
qcsrc/server/weapons/hitplot.qc
qcsrc/server/weapons/selection.qc
qcsrc/server/weapons/throwing.qc

index 2f05e1d1c4f00c8106a34154b386099dcefcb7fe..e496725e547e89f66c2459fa64b6fbc6b94cf5c7 100644 (file)
@@ -313,7 +313,7 @@ void Draw_Shockwave()
 {
        float a = bound(0, (0.5 - ((time - self.sw_time) / 0.4)), 0.5);
 
-       if not(a) { remove(self); }
+       if(!a) { remove(self); }
        
        vector deviation, angle;
 
index 60aecc3ffe3683f20c79d296736480de54aa6d3c..ded45758978d2d723b3cfc359f66efe805f59477 100644 (file)
@@ -90,7 +90,7 @@ void W_Arc_Beam_Think()
 
        float dt, f;
        dt = frametime;
-       if not(self.owner.items & IT_UNLIMITED_WEAPON_AMMO)
+       if(!(self.owner.items & IT_UNLIMITED_WEAPON_AMMO))
        {
                if(WEP_CVAR_PRI(arc, ammo))
                {
index a9dcf6f8962ee6d0c45ba9853f8eda3dfdf6d0ab..15511a01cb7a71102f9101bcdbfa1904f6c221cf 100644 (file)
@@ -606,7 +606,7 @@ float w_crylink(float req)
                                        }
                                        self.crylink_waitrelease = 0;
                                        if(!w_crylink(WR_CHECKAMMO1) && !w_crylink(WR_CHECKAMMO2))
-                                       if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+                                       if(!(self.items & IT_UNLIMITED_WEAPON_AMMO))
                                        {
                                                // ran out of ammo!
                                                self.cnt = WEP_CRYLINK;
index dafc94c9e593ca40c1117865e969adcecd6c0ff2..99ae67c1b64fc719c51bfe88ea542c2748e124b5 100644 (file)
@@ -182,8 +182,8 @@ void W_Devastator_Think (void)
        if (self.realowner.weapon == WEP_DEVASTATOR)
        {
                if(self == self.realowner.lastrocket)
-               if not(self.realowner.rl_release)
-               if not(self.BUTTON_ATCK2)
+               if(!self.realowner.rl_release)
+               if(!self.BUTTON_ATCK2)
                if(WEP_CVAR(devastator, guiderate))
                if(time > self.pushltime)
                if(self.realowner.deadflag == DEAD_NO)
index eb4f9ea6fde3c2df8fa5a1c2f6c94eb6e22ce3ef..12d44b64812c472f50155ae60c5ad9ada863161c 100644 (file)
@@ -373,7 +373,7 @@ void W_Hagar_Attack2_Load (void)
        }
 
        // we aren't checking ammo during an attack, so we must do it here
-       if not(WEP_ACTION(self.weapon, WR_CHECKAMMO1) + WEP_ACTION(self.weapon, WR_CHECKAMMO2))
+       if(!WEP_ACTION(self.weapon, WR_CHECKAMMO1) + WEP_ACTION(self.weapon, WR_CHECKAMMO2))
        {
                // note: this doesn't force the switch
                W_SwitchToOtherWeapon(self);
@@ -490,7 +490,7 @@ float w_hagar(float req)
                }
                case WR_RELOAD:
                {
-                       if not(self.hagar_load) // require releasing loaded rockets first
+                       if(!self.hagar_load) // require releasing loaded rockets first
                                W_Reload(min(WEP_CVAR_PRI(hagar, ammo), WEP_CVAR_SEC(hagar, ammo)), "weapons/reload.wav");
                                
                        return TRUE;
index ab2ef87d5a7931ba37e7d462521fcbd7b1ed45ab..28ae9a0b52b74af18e842d0516865bfc912d2539 100644 (file)
@@ -176,7 +176,7 @@ void HLAC_fire1_02()
        if (self.BUTTON_ATCK)
        {
                if (!WEP_ACTION(self.weapon, WR_CHECKAMMO1))
-               if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+               if(!(self.items & IT_UNLIMITED_WEAPON_AMMO))
                {
                        W_SwitchWeapon_Force(self, w_getbestweapon(self));
                        w_ready();
index cb0ec275232003703e4c094516633f403a152be2..53eba79bfde6acc155eafc5d0e854036e0c7129f 100644 (file)
@@ -182,8 +182,8 @@ float w_hook(float req)
                        if (self.BUTTON_ATCK || (!(self.items & IT_JETPACK) && self.BUTTON_HOOK))
                        {
                                if(!self.hook)
-                               if not(self.hook_state & HOOK_WAITING_FOR_RELEASE)
-                               if not(self.hook_state & HOOK_FIRING)
+                               if(!(self.hook_state & HOOK_WAITING_FOR_RELEASE))
+                               if(!(self.hook_state & HOOK_FIRING))
                                if (time > self.hook_refire)
                                if (weapon_prepareattack(0, -1))
                                {
@@ -208,7 +208,7 @@ float w_hook(float req)
                                self.hook_refire = max(self.hook_refire, time + WEP_CVAR_PRI(hook, refire) * W_WeaponRateFactor());
 
                                // hook also inhibits health regeneration, but only for 1 second
-                               if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+                               if(!(self.items & IT_UNLIMITED_WEAPON_AMMO))
                                        self.pauseregen_finished = max(self.pauseregen_finished, time + autocvar_g_balance_pause_fuel_regen);
                        }
 
@@ -226,7 +226,7 @@ float w_hook(float req)
                                {
                                        if ( time > self.hook_time_fueldecrease )
                                        {
-                                               if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+                                               if(!(self.items & IT_UNLIMITED_WEAPON_AMMO))
                                                {
                                                        if ( self.ammo_fuel >= (time - self.hook_time_fueldecrease) * hooked_fuel )
                                                        {
index 841254c218798ab1ad7613eba56f9b26f8d8ff5a..cc9cf32850f7dd520cbd54fc51e2beee8d6ed891 100644 (file)
@@ -137,7 +137,7 @@ void uzi_fire1_02()
        if (self.BUTTON_ATCK)
        {
                if (!WEP_ACTION(self.weapon, WR_CHECKAMMO2))
-               if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+               if (!(self.items & IT_UNLIMITED_WEAPON_AMMO))
                {
                        W_SwitchWeapon_Force(self, w_getbestweapon(self));
                        w_ready();
@@ -163,7 +163,7 @@ void uzi_mode1_fire_auto()
        }
 
        if (!WEP_ACTION(self.weapon, WR_CHECKAMMO1))
-       if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+       if (!(self.items & IT_UNLIMITED_WEAPON_AMMO))
        {
                W_SwitchWeapon_Force(self, w_getbestweapon(self));
                w_ready();
@@ -262,7 +262,7 @@ float w_uzi(float req)
                                if(weapon_prepareattack(1, 0))
                                {
                                        if (!WEP_ACTION(self.weapon, WR_CHECKAMMO2))
-                                       if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+                                       if (!(self.items & IT_UNLIMITED_WEAPON_AMMO))
                                        {
                                                W_SwitchWeapon_Force(self, w_getbestweapon(self));
                                                w_ready();
index 52b92ff2a885a3f6abd2678c2782d7a0d35cc559..bb7bae1bf674ef7357f1fa166c2ba97faf200878 100644 (file)
@@ -500,7 +500,7 @@ float w_minelayer(float req)
                        if(autocvar_g_balance_minelayer_reload_ammo && self.clip_load < WEP_CVAR(minelayer, ammo)) // forced reload
                        {
                                // not if we're holding the minelayer without enough ammo, but can detonate existing mines
-                               if not (W_PlacedMines(FALSE) && self.ammo_rockets < WEP_CVAR(minelayer, ammo))
+                               if(!(W_PlacedMines(FALSE) && self.ammo_rockets < WEP_CVAR(minelayer, ammo)))
                                        WEP_ACTION(self.weapon, WR_RELOAD);
                        }
                        else if (self.BUTTON_ATCK)
index 3ebafdc54f9a80484f85ec2cb45b0c9a3d7dc16f..1ae87d05dc0865b4e3ac5a85ad3c4dd048ef6f08 100644 (file)
@@ -183,7 +183,7 @@ float w_nex(float req)
                                                                if(self.BUTTON_ATCK2) // only eat ammo when the button is pressed
                                                                {
                                                                        dt = min(dt, (1 - self.nex_charge) / WEP_CVAR(nex, charge_rate));
-                                                                       if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+                                                                       if(!(self.items & IT_UNLIMITED_WEAPON_AMMO))
                                                                        {
                                                                                // if this weapon is reloadable, decrease its load. Else decrease the player's ammo
                                                                                if(autocvar_g_balance_nex_reload_ammo)
index c8e6cb76898383ea00af03fd8c514814a6655ae2..ac089c7009a43b10b5bf5d4e74b1eb90576b83e4 100644 (file)
@@ -330,7 +330,7 @@ float W_Shockwave_Attack_CheckHit(
        vector final_force,
        float final_damage)
 {
-       if not(head) { return FALSE; }
+       if(!head) { return FALSE; }
        float i;
 
        ++queue;
index 6108c38a28ef02451e8cd45f4afeb6d6c725359a..6e54cb0601a89df25175edb1a90fa1c44af6cd74 100644 (file)
@@ -52,14 +52,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
index 5ef9f1287d2fe7c7453a399e86d72a3068b5ad02..279537f26bc881057022e6fd5dc3867da0bb6728 100644 (file)
@@ -55,7 +55,7 @@ void W_HitPlotAnalysis(entity player, vector screenforward, vector screenright,
                lag = ANTILAG_LATENCY(player);
                if(lag < 0.001)
                        lag = 0;
-               if not(IS_REAL_CLIENT(player))
+               if(!IS_REAL_CLIENT(player))
                        lag = 0; // only antilag for clients
 
                org = player.origin + player.view_ofs;
index c232795919afc01e45aeb2c39903740f6127d417..5b43cc5ab3fee8e6922c66c4662d28d9344efd14 100644 (file)
@@ -85,7 +85,7 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain)
                                {
                                        if(e.classname == "droppedweapon")
                                                continue;
-                                       if not(e.flags & FL_ITEM)
+                                       if(!(e.flags & FL_ITEM))
                                                continue;
                                        WaypointSprite_Spawn(
                                                s,
index 19e25a4d82c9046f16e57499fff62edf222c8e26..9559ae8f8b80b9082be07c29031f00cba6207f6c 100644 (file)
@@ -191,6 +191,6 @@ void W_ThrowWeapon(vector velo, vector delta, float doreduce)
        W_SwitchWeapon_Force(self, w_getbestweapon(self));
        a = W_ThrowNewWeapon(self, w, doreduce, self.origin + delta, velo);
        
-       if not(a) return;
+       if(!a) return;
        Send_Notification(NOTIF_ONE, self, MSG_MULTI, ITEM_WEAPON_DROP, a, w);
 }