.entity queuenext;
.entity queueprev;
-.float crylink_load;
-
void W_Crylink_SetAmmoCounter()
{
// set clip_load to the weapon we have switched to, if the gun uses reloading
{
W_Crylink_Reload();
}
+ else if (req == WR_SWITCHABLE)
+ {
+ // checks if this weapon can be switched to, when reloading is enabled
+ // returns true if there's either enough load in the weapon to use it,
+ // or we have enough ammo to reload the weapon to a usable point
+ float ammo_amount;
+ ammo_amount = min(autocvar_g_balance_crylink_primary_ammo, autocvar_g_balance_crylink_secondary_ammo);
+ return self.crylink_load >= ammo_amount || self.ammo_cells >= ammo_amount;
+ }
return TRUE;
};
#endif