From: Mario Date: Mon, 9 Dec 2013 00:20:51 +0000 (+1100) Subject: Remove "if not" X-Git-Tag: xonotic-v0.8.0~152^2~287 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1a7060a3aac3e05b5f81d86215daa20ea75ca179;p=xonotic%2Fxonotic-data.pk3dir.git Remove "if not" --- diff --git a/qcsrc/client/particles.qc b/qcsrc/client/particles.qc index 2f05e1d1c..e496725e5 100644 --- a/qcsrc/client/particles.qc +++ b/qcsrc/client/particles.qc @@ -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; diff --git a/qcsrc/common/weapons/w_arc.qc b/qcsrc/common/weapons/w_arc.qc index 60aecc3ff..ded457589 100644 --- a/qcsrc/common/weapons/w_arc.qc +++ b/qcsrc/common/weapons/w_arc.qc @@ -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)) { diff --git a/qcsrc/common/weapons/w_crylink.qc b/qcsrc/common/weapons/w_crylink.qc index a9dcf6f89..15511a01c 100644 --- a/qcsrc/common/weapons/w_crylink.qc +++ b/qcsrc/common/weapons/w_crylink.qc @@ -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; diff --git a/qcsrc/common/weapons/w_devastator.qc b/qcsrc/common/weapons/w_devastator.qc index dafc94c9e..99ae67c1b 100644 --- a/qcsrc/common/weapons/w_devastator.qc +++ b/qcsrc/common/weapons/w_devastator.qc @@ -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) diff --git a/qcsrc/common/weapons/w_hagar.qc b/qcsrc/common/weapons/w_hagar.qc index eb4f9ea6f..12d44b648 100644 --- a/qcsrc/common/weapons/w_hagar.qc +++ b/qcsrc/common/weapons/w_hagar.qc @@ -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; diff --git a/qcsrc/common/weapons/w_hlac.qc b/qcsrc/common/weapons/w_hlac.qc index ab2ef87d5..28ae9a0b5 100644 --- a/qcsrc/common/weapons/w_hlac.qc +++ b/qcsrc/common/weapons/w_hlac.qc @@ -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(); diff --git a/qcsrc/common/weapons/w_hook.qc b/qcsrc/common/weapons/w_hook.qc index cb0ec2752..53eba79bf 100644 --- a/qcsrc/common/weapons/w_hook.qc +++ b/qcsrc/common/weapons/w_hook.qc @@ -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 ) { diff --git a/qcsrc/common/weapons/w_machinegun.qc b/qcsrc/common/weapons/w_machinegun.qc index 841254c21..cc9cf3285 100644 --- a/qcsrc/common/weapons/w_machinegun.qc +++ b/qcsrc/common/weapons/w_machinegun.qc @@ -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(); diff --git a/qcsrc/common/weapons/w_minelayer.qc b/qcsrc/common/weapons/w_minelayer.qc index 52b92ff2a..bb7bae1bf 100644 --- a/qcsrc/common/weapons/w_minelayer.qc +++ b/qcsrc/common/weapons/w_minelayer.qc @@ -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) diff --git a/qcsrc/common/weapons/w_nex.qc b/qcsrc/common/weapons/w_nex.qc index 3ebafdc54..1ae87d05d 100644 --- a/qcsrc/common/weapons/w_nex.qc +++ b/qcsrc/common/weapons/w_nex.qc @@ -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) diff --git a/qcsrc/common/weapons/w_shockwave.qc b/qcsrc/common/weapons/w_shockwave.qc index c8e6cb768..ac089c700 100644 --- a/qcsrc/common/weapons/w_shockwave.qc +++ b/qcsrc/common/weapons/w_shockwave.qc @@ -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; diff --git a/qcsrc/server/weapons/common.qc b/qcsrc/server/weapons/common.qc index 6108c38a2..6e54cb060 100644 --- a/qcsrc/server/weapons/common.qc +++ b/qcsrc/server/weapons/common.qc @@ -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 diff --git a/qcsrc/server/weapons/hitplot.qc b/qcsrc/server/weapons/hitplot.qc index 5ef9f1287..279537f26 100644 --- a/qcsrc/server/weapons/hitplot.qc +++ b/qcsrc/server/weapons/hitplot.qc @@ -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; diff --git a/qcsrc/server/weapons/selection.qc b/qcsrc/server/weapons/selection.qc index c23279591..5b43cc5ab 100644 --- a/qcsrc/server/weapons/selection.qc +++ b/qcsrc/server/weapons/selection.qc @@ -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, diff --git a/qcsrc/server/weapons/throwing.qc b/qcsrc/server/weapons/throwing.qc index 19e25a4d8..9559ae8f8 100644 --- a/qcsrc/server/weapons/throwing.qc +++ b/qcsrc/server/weapons/throwing.qc @@ -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); }