sprint(self, strcat("You don't have enough ammo to reload the ^2", W_Name(self.weapon), "\n"));
self.reload_complain = time + 1;
}
- // switch away if the loaded amount of ammo is not enough to keep using this weapon
- if(self.clip_load < ammo_shot)
+ // switch away if the amount of ammo is not enough to keep using this weapon
+ if not(weapon_action(self.weapon, WR_CHECKAMMO1) + weapon_action(self.weapon, WR_CHECKAMMO2))
{
self.clip_load = -1; // reload later
W_SwitchToOtherWeapon(self);
else if (req == WR_THINK)
{
if(autocvar_g_balance_shotgun_reload_ammo && self.clip_load < autocvar_g_balance_shotgun_primary_ammo) // forced reload
- W_Shotgun_Reload();
+ {
+ // don't force reload an empty shotgun if its melee attack is active
+ if not(autocvar_g_balance_shotgun_secondary && self.ammo_shells < autocvar_g_balance_shotgun_primary_ammo)
+ W_Shotgun_Reload();
+ }
else
{
if (self.BUTTON_ATCK)
}
}
}
- if (self.BUTTON_ATCK2 && autocvar_g_balance_shotgun_secondary)
- if (weapon_prepareattack(1, autocvar_g_balance_shotgun_secondary_refire))
- {
- // attempt forcing playback of the anim by switching to another anim (that we never play) here...
- weapon_thinkf(WFRAME_FIRE1, 0, W_Shotgun_Attack2);
- }
+ }
+ if (self.BUTTON_ATCK2 && autocvar_g_balance_shotgun_secondary)
+ if (weapon_prepareattack(1, autocvar_g_balance_shotgun_secondary_refire))
+ {
+ // attempt forcing playback of the anim by switching to another anim (that we never play) here...
+ weapon_thinkf(WFRAME_FIRE1, 0, W_Shotgun_Attack2);
}
}
else if (req == WR_PRECACHE)