]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_laser.qc
Set weapons to fully loaded on respawn in each weapon file instead of cl_client....
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_laser.qc
index f3bd6e0b1371245ac7e89f3b1b54529c06172311..222feb1c56a3261dc4c1899195bd64e5764411c2 100644 (file)
@@ -317,17 +317,6 @@ float w_laser(float req)
                                        W_SwitchWeapon (self.cnt);
                        }
                }
-        if(self.wish_reload)
-        {
-            if(self.switchweapon == self.weapon)
-            {
-                if(self.weaponentity.state == WS_READY)
-                {
-                    self.wish_reload = 0;
-                    W_Laser_Reload();
-                }
-            }
-        }
        }
        else if (req == WR_PRECACHE)
        {
@@ -344,15 +333,21 @@ float w_laser(float req)
                W_Laser_SetAmmoCounter();
        }
        else if (req == WR_CHECKAMMO1)
+       {
                return TRUE;
+       }
        else if (req == WR_CHECKAMMO2)
+       {
                return TRUE;
+       }
+       else if (req == WR_RESETPLAYER)
+       {
+               // all weapons must be fully loaded when we spawn
+               self.laser_load = autocvar_g_balance_laser_reload_ammo;
+       }
        else if (req == WR_RELOAD)
-               W_Laser_Reload();
-       else if (req == WR_SWITCHABLE)
        {
-               // laser uses no ammo, always switchable
-               return TRUE;
+               W_Laser_Reload();
        }
        return TRUE;
 };