From: terencehill Date: Thu, 31 Jan 2019 15:05:49 +0000 (+0100) Subject: Remove a repeated useless check X-Git-Tag: xonotic-v0.8.5~1623 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=08cc810a2310ae50dc7055c42e22535d572c1d39;p=xonotic%2Fxonotic-data.pk3dir.git Remove a repeated useless check --- diff --git a/qcsrc/server/impulse.qc b/qcsrc/server/impulse.qc index 8a17ef6a1..2e315571c 100644 --- a/qcsrc/server/impulse.qc +++ b/qcsrc/server/impulse.qc @@ -63,7 +63,7 @@ { \ .entity weaponentity = weaponentities[wepslot]; \ W_NextWeaponOnImpulse(this, slot, weaponentity); \ - if(wepslot == 0 && autocvar_g_weaponswitch_debug != 1) \ + if(autocvar_g_weaponswitch_debug != 1) \ break; \ } \ } @@ -97,7 +97,7 @@ X(0) { \ .entity weaponentity = weaponentities[wepslot]; \ W_CycleWeapon(this, CS(this).cvar_cl_weaponpriorities[slot], dir, weaponentity); \ - if(wepslot == 0 && autocvar_g_weaponswitch_debug != 1) \ + if(autocvar_g_weaponswitch_debug != 1) \ break; \ } \ } @@ -150,7 +150,7 @@ X(9, next) { \ .entity weaponentity = weaponentities[slot]; \ W_SwitchWeapon_TryOthers(this, Weapons_from(WEP_FIRST + i), weaponentity); \ - if(slot == 0 && autocvar_g_weaponswitch_debug != 1) \ + if(autocvar_g_weaponswitch_debug != 1) \ break; \ } \ } @@ -193,7 +193,7 @@ IMPULSE(weapon_next_byid) .entity weaponentity = weaponentities[slot]; W_NextWeapon(this, 0, weaponentity); - if(slot == 0 && autocvar_g_weaponswitch_debug != 1) + if(autocvar_g_weaponswitch_debug != 1) break; } } @@ -211,7 +211,7 @@ IMPULSE(weapon_prev_byid) .entity weaponentity = weaponentities[slot]; W_PreviousWeapon(this, 0, weaponentity); - if(slot == 0 && autocvar_g_weaponswitch_debug != 1) + if(autocvar_g_weaponswitch_debug != 1) break; } } @@ -229,7 +229,7 @@ IMPULSE(weapon_next_bygroup) .entity weaponentity = weaponentities[slot]; W_NextWeapon(this, 1, weaponentity); - if(slot == 0 && autocvar_g_weaponswitch_debug != 1) + if(autocvar_g_weaponswitch_debug != 1) break; } } @@ -247,7 +247,7 @@ IMPULSE(weapon_prev_bygroup) .entity weaponentity = weaponentities[slot]; W_PreviousWeapon(this, 1, weaponentity); - if(slot == 0 && autocvar_g_weaponswitch_debug != 1) + if(autocvar_g_weaponswitch_debug != 1) break; } } @@ -265,7 +265,7 @@ IMPULSE(weapon_next_bypriority) .entity weaponentity = weaponentities[slot]; W_NextWeapon(this, 2, weaponentity); - if(slot == 0 && autocvar_g_weaponswitch_debug != 1) + if(autocvar_g_weaponswitch_debug != 1) break; } } @@ -283,7 +283,7 @@ IMPULSE(weapon_prev_bypriority) .entity weaponentity = weaponentities[slot]; W_PreviousWeapon(this, 2, weaponentity); - if(slot == 0 && autocvar_g_weaponswitch_debug != 1) + if(autocvar_g_weaponswitch_debug != 1) break; } } @@ -297,7 +297,7 @@ IMPULSE(weapon_last) .entity weaponentity = weaponentities[slot]; W_LastWeapon(this, weaponentity); - if(slot == 0 && autocvar_g_weaponswitch_debug != 1) + if(autocvar_g_weaponswitch_debug != 1) break; } } @@ -311,7 +311,7 @@ IMPULSE(weapon_best) .entity weaponentity = weaponentities[slot]; W_SwitchWeapon(this, w_getbestweapon(this, weaponentity), weaponentity); - if(slot == 0 && autocvar_g_weaponswitch_debug != 1) + if(autocvar_g_weaponswitch_debug != 1) break; } } @@ -325,7 +325,7 @@ IMPULSE(weapon_drop) .entity weaponentity = weaponentities[slot]; W_ThrowWeapon(this, weaponentity, W_CalculateProjectileVelocity(this, this.velocity, v_forward * 750, false), '0 0 0', true); - if(slot == 0 && autocvar_g_weaponswitch_debug != 1) + if(autocvar_g_weaponswitch_debug != 1) break; } } @@ -343,7 +343,7 @@ IMPULSE(weapon_reload) w.wr_reload(w, actor, weaponentity); // allow reloading all active slots? - //if(slot == 0 && autocvar_g_weaponswitch_debug != 1) + //if(autocvar_g_weaponswitch_debug != 1) //break; } }