float autocvar_g_balance_minelayer_reload_ammo;
float autocvar_g_balance_minelayer_reload_time;
float autocvar_g_balance_minstanex_ammo;
+float autocvar_g_balance_minstanex_laser_ammo;
float autocvar_g_balance_minstanex_animtime;
float autocvar_g_balance_minstanex_refire;
float autocvar_g_balance_minstanex_reload_ammo;
-float autocvar_g_balance_minstanex_reload_laserload;
float autocvar_g_balance_minstanex_reload_time;
float autocvar_g_balance_nex_charge;
float autocvar_g_balance_nex_charge_limit;
.float minstanex_load;
-float W_Minstanex_LaserUsesLoad()
-{
- // if the minsta uses reloading, and consumption is enabled for the minsta laser, decrease clip load
- if(!autocvar_g_balance_minstanex_reload_ammo) // reloading is disabled
- return FALSE;
-
- if(autocvar_g_balance_minstanex_reload_laserload)
- return autocvar_g_balance_minstanex_reload_laserload;
-
- return FALSE;
-}
-
void W_Minstanex_SetAmmoCounter()
{
// set clip_load to the weapon we have switched to, if the gun uses reloading
if(!autocvar_g_balance_minstanex_reload_ammo)
return;
- if(W_Minstanex_LaserUsesLoad())
+ if(autocvar_g_balance_minstanex_laser_ammo)
{
- if(!W_ReloadCheck(self.ammo_cells, min(autocvar_g_balance_minstanex_ammo, W_Minstanex_LaserUsesLoad())))
+ if(!W_ReloadCheck(self.ammo_cells, min(autocvar_g_balance_minstanex_ammo, autocvar_g_balance_minstanex_laser_ammo)))
return;
}
else if(!W_ReloadCheck(self.ammo_cells, autocvar_g_balance_minstanex_ammo))
minstanex_ammo = autocvar_g_balance_minstanex_ammo;
// if the laser uses load, we also consider its ammo for reloading
- if(autocvar_g_balance_minstanex_reload_ammo && W_Minstanex_LaserUsesLoad() && self.clip_load < min(minstanex_ammo, W_Minstanex_LaserUsesLoad())) // forced reload
+ if(autocvar_g_balance_minstanex_reload_ammo && autocvar_g_balance_minstanex_laser_ammo && self.clip_load < min(minstanex_ammo, autocvar_g_balance_minstanex_laser_ammo)) // forced reload
W_Minstanex_Reload();
else if(autocvar_g_balance_minstanex_reload_ammo && self.clip_load < minstanex_ammo) // forced reload
W_Minstanex_Reload();
{
self.jump_interval = time + autocvar_g_balance_laser_primary_refire * W_WeaponRateFactor();
- // decrease clip load for the laser?
- if(autocvar_g_balance_minstanex_reload_ammo && W_Minstanex_LaserUsesLoad())
- self.clip_load -= W_Minstanex_LaserUsesLoad();
+ // decrease ammo for the laser?
+ if(autocvar_g_balance_minstanex_laser_ammo)
+ {
+ if(autocvar_g_balance_minstanex_reload_ammo)
+ self.clip_load -= autocvar_g_balance_minstanex_laser_ammo;
+ else
+ self.ammo_cells -= autocvar_g_balance_minstanex_laser_ammo;
+ }
// ugly minstagib hack to reuse the fire mode of the laser
float w;
}
else if (req == WR_CHECKAMMO2)
{
- if(W_Minstanex_LaserUsesLoad())
- return W_Minstanex_LaserUsesLoad();
+ if(autocvar_g_balance_minstanex_laser_ammo)
+ return autocvar_g_balance_minstanex_laser_ammo;
else
return TRUE;
}