]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove a repeated useless check
authorterencehill <piuntn@gmail.com>
Thu, 31 Jan 2019 15:05:49 +0000 (16:05 +0100)
committerterencehill <piuntn@gmail.com>
Thu, 31 Jan 2019 15:05:49 +0000 (16:05 +0100)
qcsrc/server/impulse.qc

index 8a17ef6a1dd44abfca2b064b20434285a5df1054..2e315571c951b9171de078436a15b7c8a431f7eb 100644 (file)
@@ -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;
        }
 }