Fix not being able to deploy weapons with no ammo

Addresses https://github.com/JetBoom/zombiesurvival/issues/132
This commit is contained in:
JetBoom 2015-04-19 01:54:47 -04:00
parent 123549a962
commit f92ab98363
18 changed files with 52 additions and 56 deletions

View file

@ -9,12 +9,12 @@ SWEP.AdminSpawnable = true
SWEP.Primary.ClipSize = -1 SWEP.Primary.ClipSize = -1
SWEP.Primary.DefaultClip = -1 SWEP.Primary.DefaultClip = -1
SWEP.Primary.Automatic = false SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = "None" SWEP.Primary.Ammo = "none"
SWEP.Secondary.ClipSize = -1 SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "None" SWEP.Secondary.Ammo = "none"
SWEP.DrawCrosshair = false SWEP.DrawCrosshair = false
SWEP.Primary.Sound = Sound("") SWEP.Primary.Sound = Sound("")

View file

@ -9,10 +9,10 @@ SWEP.Primary.Ammo = "airboatgun"
SWEP.Primary.Delay = 1 SWEP.Primary.Delay = 1
SWEP.Primary.Automatic = true SWEP.Primary.Automatic = true
SWEP.Secondary.ClipSize = -1 SWEP.Secondary.ClipSize = 1
SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.DefaultClip = 1
SWEP.Secondary.Ammo = "dummy"
SWEP.Secondary.Automatic = false SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"
SWEP.WalkSpeed = SPEED_NORMAL SWEP.WalkSpeed = SPEED_NORMAL
SWEP.FullWalkSpeed = SPEED_SLOWEST SWEP.FullWalkSpeed = SPEED_SLOWEST

View file

@ -7,10 +7,10 @@ SWEP.Primary.Ammo = "SniperRound"
SWEP.Primary.Delay = 1.25 SWEP.Primary.Delay = 1.25
SWEP.Primary.DefaultClip = 5 SWEP.Primary.DefaultClip = 5
SWEP.Secondary.ClipSize = -1 SWEP.Secondary.ClipSize = 1
SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.DefaultClip = 1
SWEP.Secondary.Ammo = "dummy"
SWEP.Secondary.Automatic = false SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"
SWEP.UseHands = true SWEP.UseHands = true

View file

@ -16,10 +16,10 @@ SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = "pistol" SWEP.Primary.Ammo = "pistol"
SWEP.RequiredClip = 1 SWEP.RequiredClip = 1
SWEP.Secondary.ClipSize = -1 SWEP.Secondary.ClipSize = 1
SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.DefaultClip = 1
SWEP.Secondary.Automatic = false SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none" SWEP.Secondary.Ammo = "dummy"
SWEP.WalkSpeed = SPEED_NORMAL SWEP.WalkSpeed = SPEED_NORMAL

View file

@ -18,10 +18,10 @@ SWEP.MeleeRange = 65
SWEP.MeleeSize = 1.5 SWEP.MeleeSize = 1.5
SWEP.MeleeKnockBack = 0 SWEP.MeleeKnockBack = 0
SWEP.Secondary.ClipSize = -1 SWEP.Secondary.ClipSize = 1
SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.DefaultClip = 1
SWEP.Secondary.Ammo = "dummy"
SWEP.Secondary.Automatic = true SWEP.Secondary.Automatic = true
SWEP.Secondary.Ammo = "none"
SWEP.WalkSpeed = SPEED_FAST SWEP.WalkSpeed = SPEED_FAST

View file

@ -9,10 +9,10 @@ SWEP.Primary.Ammo = "SniperRound"
SWEP.Primary.Delay = 1 SWEP.Primary.Delay = 1
SWEP.Primary.DefaultClip = 3 SWEP.Primary.DefaultClip = 3
SWEP.Secondary.ClipSize = -1 SWEP.Secondary.ClipSize = 1
SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.DefaultClip = 1
SWEP.Secondary.Ammo = "dummy"
SWEP.Secondary.Automatic = true SWEP.Secondary.Automatic = true
SWEP.Secondary.Ammo = "none"
SWEP.Secondary.Delay = 0.15 SWEP.Secondary.Delay = 0.15
SWEP.WalkSpeed = SPEED_NORMAL SWEP.WalkSpeed = SPEED_NORMAL

View file

@ -9,10 +9,9 @@ SWEP.Primary.Ammo = "sniperpenetratedround"
SWEP.Primary.Delay = 1 SWEP.Primary.Delay = 1
SWEP.Primary.Automatic = true SWEP.Primary.Automatic = true
SWEP.Secondary.ClipSize = -1 SWEP.Secondary.ClipSize = 1
SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.DefaultClip = 1
SWEP.Secondary.Automatic = false SWEP.Secondary.Ammo = "dummy"
SWEP.Secondary.Ammo = "none"
SWEP.WalkSpeed = SPEED_NORMAL SWEP.WalkSpeed = SPEED_NORMAL
SWEP.FullWalkSpeed = SPEED_SLOW SWEP.FullWalkSpeed = SPEED_SLOW

View file

@ -42,10 +42,9 @@ SWEP.Primary.Ammo = "drone"
SWEP.Primary.Delay = 1 SWEP.Primary.Delay = 1
SWEP.Primary.DefaultClip = 1 SWEP.Primary.DefaultClip = 1
SWEP.Secondary.ClipSize = -1 SWEP.Secondary.ClipSize = 1
SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.DefaultClip = 1
SWEP.Secondary.Automatic = false SWEP.Secondary.Ammo = "dummy"
SWEP.Secondary.Ammo = "none"
SWEP.WalkSpeed = SPEED_FAST SWEP.WalkSpeed = SPEED_FAST

View file

@ -9,10 +9,9 @@ SWEP.Primary.Ammo = "slam"
SWEP.Primary.Delay = 1 SWEP.Primary.Delay = 1
SWEP.Primary.Automatic = true SWEP.Primary.Automatic = true
SWEP.Secondary.ClipSize = -1 SWEP.Secondary.ClipSize = 1
SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.DefaultClip = 1
SWEP.Secondary.Automatic = false SWEP.Secondary.Ammo = "dummy"
SWEP.Secondary.Ammo = "none"
SWEP.WalkSpeed = SPEED_NORMAL SWEP.WalkSpeed = SPEED_NORMAL
SWEP.FullWalkSpeed = SPEED_SLOWEST SWEP.FullWalkSpeed = SPEED_SLOWEST

View file

@ -10,10 +10,9 @@ SWEP.Primary.Ammo = "grenade"
SWEP.Primary.Delay = 1.25 SWEP.Primary.Delay = 1.25
SWEP.Primary.DefaultClip = 1 SWEP.Primary.DefaultClip = 1
SWEP.Secondary.ClipSize = -1 SWEP.Secondary.ClipSize = 1
SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.DefaultClip = 1
SWEP.Secondary.Automatic = false SWEP.Secondary.Ammo = "dummy"
SWEP.Secondary.Ammo = "none"
SWEP.WalkSpeed = SPEED_FAST SWEP.WalkSpeed = SPEED_FAST

View file

@ -13,10 +13,9 @@ SWEP.Primary.Ammo = "GaussEnergy"
SWEP.Primary.Delay = 1 SWEP.Primary.Delay = 1
SWEP.Primary.DefaultClip = 16 SWEP.Primary.DefaultClip = 16
SWEP.Secondary.ClipSize = -1 SWEP.Secondary.ClipSize = 1
SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.DefaultClip = 1
SWEP.Secondary.Automatic = false SWEP.Secondary.Ammo = "dummy"
SWEP.Secondary.Ammo = "none"
SWEP.MeleeDamage = 35 SWEP.MeleeDamage = 35
SWEP.MeleeRange = 50 SWEP.MeleeRange = 50

View file

@ -45,10 +45,9 @@ SWEP.Primary.Ammo = "manhack"
SWEP.Primary.Delay = 1 SWEP.Primary.Delay = 1
SWEP.Primary.DefaultClip = 1 SWEP.Primary.DefaultClip = 1
SWEP.Secondary.ClipSize = -1 SWEP.Secondary.ClipSize = 1
SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.DefaultClip = 1
SWEP.Secondary.Automatic = false SWEP.Secondary.Ammo = "dummy"
SWEP.Secondary.Ammo = "none"
SWEP.WalkSpeed = SPEED_FAST SWEP.WalkSpeed = SPEED_FAST

View file

@ -29,9 +29,9 @@ SWEP.Primary.Ammo = "Battery"
SWEP.Secondary.Delay = 20 SWEP.Secondary.Delay = 20
SWEP.Secondary.Heal = 10 SWEP.Secondary.Heal = 10
SWEP.Secondary.ClipSize = -1 SWEP.Secondary.ClipSize = 1
SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.DefaultClip = 1
SWEP.Secondary.Ammo = "none" SWEP.Secondary.Ammo = "dummy"
SWEP.WalkSpeed = SPEED_NORMAL SWEP.WalkSpeed = SPEED_NORMAL

View file

@ -9,10 +9,10 @@ SWEP.Primary.Ammo = "striderminigun"
SWEP.Primary.Delay = 1 SWEP.Primary.Delay = 1
SWEP.Primary.Automatic = true SWEP.Primary.Automatic = true
SWEP.Secondary.ClipSize = -1 SWEP.Secondary.ClipSize = 1
SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.DefaultClip = 1
SWEP.Secondary.Automatic = false SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none" SWEP.Secondary.Ammo = "dummy"
SWEP.WalkSpeed = SPEED_NORMAL SWEP.WalkSpeed = SPEED_NORMAL
SWEP.FullWalkSpeed = SPEED_SLOW SWEP.FullWalkSpeed = SPEED_SLOW

View file

@ -9,10 +9,10 @@ SWEP.Primary.Ammo = "helicoptergun"
SWEP.Primary.Delay = 1 SWEP.Primary.Delay = 1
SWEP.Primary.Automatic = true SWEP.Primary.Automatic = true
SWEP.Secondary.ClipSize = -1 SWEP.Secondary.ClipSize = 1
SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.DefaultClip = 1
SWEP.Secondary.Automatic = false SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none" SWEP.Secondary.Ammo = "dummy"
SWEP.WalkSpeed = SPEED_NORMAL SWEP.WalkSpeed = SPEED_NORMAL
SWEP.FullWalkSpeed = SPEED_SLOWEST SWEP.FullWalkSpeed = SPEED_SLOWEST

View file

@ -9,10 +9,10 @@ SWEP.Primary.Ammo = "spotlamp"
SWEP.Primary.Delay = 1 SWEP.Primary.Delay = 1
SWEP.Primary.Automatic = true SWEP.Primary.Automatic = true
SWEP.Secondary.ClipSize = -1 SWEP.Secondary.ClipSize = 1
SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.DefaultClip = 1
SWEP.Secondary.Automatic = false SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none" SWEP.Secondary.Ammo = "dummy"
SWEP.WalkSpeed = SPEED_NORMAL SWEP.WalkSpeed = SPEED_NORMAL
SWEP.FullWalkSpeed = SPEED_SLOWEST SWEP.FullWalkSpeed = SPEED_SLOWEST

View file

@ -42,10 +42,10 @@ SWEP.Primary.Ammo = "stone"
SWEP.Primary.Delay = 1 SWEP.Primary.Delay = 1
SWEP.Primary.DefaultClip = 1 SWEP.Primary.DefaultClip = 1
SWEP.Secondary.ClipSize = -1 SWEP.Secondary.ClipSize = 1
SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.DefaultClip = 1
SWEP.Secondary.Automatic = false SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none" SWEP.Secondary.Ammo = "dummy"
SWEP.WalkSpeed = SPEED_FAST SWEP.WalkSpeed = SPEED_FAST

View file

@ -109,6 +109,8 @@ function GM:AddCustomAmmo()
game.AddAmmoType({name = "manhack"}) game.AddAmmoType({name = "manhack"})
game.AddAmmoType({name = "manhack_saw"}) game.AddAmmoType({name = "manhack_saw"})
game.AddAmmoType({name = "drone"}) game.AddAmmoType({name = "drone"})
game.AddAmmoType({name = "dummy"})
end end
function GM:CanRemoveOthersNail(pl, nailowner, ent) function GM:CanRemoveOthersNail(pl, nailowner, ent)