#ifdef SVQC
// NO bounce protection, as bounces are limited!
-// weapon load persistence, for weapons that support reloading
-.float hagar_load;
-
void W_Hagar_SetAmmoCounter()
{
// set clip_load to the weapon we have switched to, if the gun uses reloading
self.clip_load = 0; // also keeps crosshair ammo from displaying
else
{
- self.clip_load = self.hagar_load;
+ self.clip_load = self.weapon_load[WEP_HAGAR];
self.clip_size = autocvar_g_balance_hagar_reload_ammo; // for the crosshair ammo display
}
}
if(autocvar_g_balance_hagar_reload_ammo)
{
self.clip_load -= autocvar_g_balance_hagar_primary_ammo;
- self.hagar_load = self.clip_load;
+ self.weapon_load[WEP_HAGAR] = self.clip_load;
}
else
self.ammo_rockets -= autocvar_g_balance_hagar_primary_ammo;
if(autocvar_g_balance_hagar_reload_ammo)
{
self.clip_load -= autocvar_g_balance_hagar_secondary_ammo;
- self.hagar_load = self.clip_load;
+ self.weapon_load[WEP_HAGAR] = self.clip_load;
}
else
self.ammo_rockets -= autocvar_g_balance_hagar_secondary_ammo;
else if (req == WR_CHECKAMMO1)
{
ammo_amount = self.ammo_rockets >= autocvar_g_balance_hagar_primary_ammo;
- ammo_amount += self.hagar_load >= autocvar_g_balance_hagar_primary_ammo;
+ ammo_amount += self.weapon_load[WEP_HAGAR] >= autocvar_g_balance_hagar_primary_ammo;
return ammo_amount;
}
else if (req == WR_CHECKAMMO2)
{
ammo_amount = self.ammo_rockets >= autocvar_g_balance_hagar_secondary_ammo;
- ammo_amount += self.hagar_load >= autocvar_g_balance_hagar_secondary_ammo;
+ ammo_amount += self.weapon_load[WEP_HAGAR] >= autocvar_g_balance_hagar_secondary_ammo;
return ammo_amount;
}
else if (req == WR_RESETPLAYER)
{
// all weapons must be fully loaded when we spawn
- self.hagar_load = autocvar_g_balance_hagar_reload_ammo;
+ self.weapon_load[WEP_HAGAR] = autocvar_g_balance_hagar_reload_ammo;
}
else if (req == WR_RELOAD)
{