SWEP:Reload() function gets called even when I don't have ammo to load into the gun

Really simple, when I press reload (or hold reload) it continuously calls my reload function if there’s no ammo to put in the gun, even when I’m still firing.

In SWEP:Reload(), check if you have reserve ammo? Something like this, I would assume:

Just might help.

I gave it a shot, and I think it only returns the ammo in the gun.

Perhaps?

Weapon.Clip1 and Weapon.Clip2 return the ammo in the gun. Player.GetAmmoCount returns how much ammo you have in your pocket for a given ammo type.

[lua]function SWEP:Reload()
if self.Owner:GetActiveWeapon():Clip1() == self.Primary.ClipSize then return end
if self.Owner:GetAmmoCount(self.Primary.Ammo) == 0 then return end
if self.Weapon:Clip1() < self.Primary.ClipSize then
self.Weapon:DefaultReload(ACT_VM_RELOAD)
end
end[/lua]

I use this in my weapon base. :stuck_out_tongue: