]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_grenadelauncher.qc
Fix some code that was defined in the client part of the weapons code by mistake
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_grenadelauncher.qc
index 23312b9141bdf7cd5c9de35e5b05fb98af3b4a2f..d01194b0bde43044a9ee1c8f00baa1d040cc9703 100644 (file)
@@ -215,13 +215,6 @@ void W_Grenade_Attack (void)
 {
        local entity gren;
 
-       // if there's not enough ammo for this attack (but we still have the weapon), reload
-       if(autocvar_g_balance_grenadelauncher_reload_ammo && self.clip_load < autocvar_g_balance_grenadelauncher_primary_ammo)
-       {
-               W_GrenadeLauncher_Reload();
-               return;
-       }
-
        // if this weapon is reloadable, decrease its load. Else decrease the player's ammo
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
        {
@@ -279,13 +272,6 @@ void W_Grenade_Attack2 (void)
 {
        local entity gren;
 
-       // if there's not enough ammo for this attack (but we still have the weapon), reload
-       if(autocvar_g_balance_grenadelauncher_reload_ammo && self.clip_load < autocvar_g_balance_grenadelauncher_secondary_ammo)
-       {
-               W_GrenadeLauncher_Reload();
-               return;
-       }
-
        // if this weapon is reloadable, decrease its load. Else decrease the player's ammo
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
        {
@@ -449,6 +435,10 @@ float w_glauncher(float req)
                else
                        return self.ammo_rockets >= autocvar_g_balance_grenadelauncher_secondary_ammo;
        }
+       else if (req == WR_RELOAD)
+       {
+               W_GrenadeLauncher_Reload();
+       }
        return TRUE;
 };
 #endif
@@ -484,10 +474,6 @@ float w_glauncher(float req)
                else // unchecked: SECONDARY, BOUNCE
                        w_deathtypestring = "%s ate %s's grenade";
        }
-       else if (req == WR_RELOAD)
-       {
-               W_GrenadeLauncher_Reload();
-       }
        return TRUE;
 }
 #endif