Merge pull request #65 from BClark09/patch-1

Fixed gamemode ignoring MaxAmmoPickups
This commit is contained in:
William Moodhe / JetBoom 2014-12-17 20:46:58 -05:00
commit 2678e83ef9

View file

@ -43,7 +43,7 @@ end
function ENT:Use(activator, caller)
if activator:IsPlayer() and activator:Alive() and not activator:KeyDown(GAMEMODE.UtilityKey) and activator:Team() ~= TEAM_UNDEAD and not self.Removing then
if not self.PlacedInMap or not GAMEMODE.MaxAmmoBoxPickups or (activator.AmmoPickups or 0) < GAMEMODE.MaxAmmoBoxPickups or team.NumPlayers(TEAM_HUMAN) <= 1 then
if not self.PlacedInMap or not GAMEMODE.MaxAmmoPickups or (activator.AmmoPickups or 0) < GAMEMODE.MaxAmmoPickups or team.NumPlayers(TEAM_HUMAN) <= 1 then
if self.PlacedInMap and GAMEMODE.WeaponRequiredForAmmo and team.NumPlayers(TEAM_HUMAN) > 1 then
local hasweapon = false
for _, wep in pairs(activator:GetWeapons()) do