fixed problem with autofire and no ammo

This commit is contained in:
Magnus Auvinen 2007-12-19 21:04:55 +00:00
parent 4880814f30
commit 8c93744eb3

View file

@ -1000,7 +1000,7 @@ int player::handle_weapons()
if(active_weapon == WEAPON_ROCKET || active_weapon == WEAPON_SHOTGUN)
fullauto = true;
if(count_input(previnput.fire, input.fire).presses || (fullauto && input.fire&1))
if(count_input(previnput.fire, input.fire).presses || ((fullauto && input.fire&1) && weapons[active_weapon].ammo))
{
// fire!
if(weapons[active_weapon].ammo)