]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_minstanex.qc
Remove the switchable check and do all checks in the WR_CHECKAMMO checks. Only fixed...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_minstanex.qc
index da25ad8ffab5deccbf68ac69b9af1bd1c7462cf5..8b01ceee849ff4cf48605b17ac8bb77809e73db0 100644 (file)
@@ -4,8 +4,6 @@ REGISTER_WEAPON(MINSTANEX, w_minstanex, IT_CELLS, 7, WEP_FLAG_HIDDEN | WEP_FLAG_
 #ifdef SVQC
 .float minstanex_lasthit;
 
-.float minstanex_load;
-
 void W_Minstanex_SetAmmoCounter()
 {
        // set clip_load to the weapon we have switched to, if the gun uses reloading
@@ -317,6 +315,7 @@ float w_minstanex(float req)
                precache_sound ("weapons/nexwhoosh1.wav");
                precache_sound ("weapons/nexwhoosh2.wav");
                precache_sound ("weapons/nexwhoosh3.wav");
+               precache_sound ("weapons/reload.wav");
                w_laser(WR_PRECACHE);
        }
        else if (req == WR_SETUP)
@@ -334,10 +333,12 @@ float w_minstanex(float req)
        }
        else if (req == WR_CHECKAMMO2)
        {
-               if(autocvar_g_balance_minstanex_laser_ammo)
-                       return autocvar_g_balance_minstanex_laser_ammo;
-               else
+               if(!autocvar_g_balance_minstanex_laser_ammo)
                        return TRUE;
+               if(autocvar_g_balance_minstanex_reload_ammo)
+                       return self.clip_load >= autocvar_g_balance_minstanex_laser_ammo;
+               else
+                       return self.ammo_cells >= autocvar_g_balance_minstanex_laser_ammo;
        }
        else if (req == WR_RESETPLAYER)
        {