#else
#ifdef SVQC
+// weapon load persistence, for weapons that support reloading
+.float shotgun_load;
+
void W_Shotgun_SetAmmoCounter()
{
// set clip_load to the weapon we have switched to, if the gun uses reloading
weapon_thinkf(WFRAME_FIRE1, 0, W_Shotgun_Attack2);
}
}
- if(self.wish_reload)
- {
- if(self.switchweapon == self.weapon)
- {
- if(self.weaponentity.state == WS_READY)
- {
- self.wish_reload = 0;
- W_Shotgun_Reload();
- }
- }
- }
}
else if (req == WR_PRECACHE)
{
}
else if (req == WR_CHECKAMMO2)
{
- // melee attack must always be available
+ // melee attack is always available
return TRUE;
}
+ else if (req == WR_RESETPLAYER)
+ {
+ // all weapons must be fully loaded when we spawn
+ self.shotgun_load = autocvar_g_balance_shotgun_reload_ammo;
+ }
else if (req == WR_RELOAD)
{
W_Shotgun_Reload();