Fixed fists returning to an incorrect move speed

Also fixed fists not having a faster speed for Zombie Escape and not
switching to that speed when initially switching to that weapon.
This commit is contained in:
Ben 2014-12-10 01:56:00 +00:00
parent 18a98a6110
commit e0604b8fb8

View file

@ -2,7 +2,12 @@ AddCSLuaFile()
SWEP.PrintName = "Fists" SWEP.PrintName = "Fists"
SWEP.WalkSpeed = SPEED_NORMAL if GAMEMODE.ZombieEscape then
SWEP.WalkSpeed = SPEED_ZOMBIEESCAPE_NORMAL
else
SWEP.WalkSpeed = SPEED_NORMAL
end
SWEP.IsMelee = true SWEP.IsMelee = true
SWEP.UseHands = true SWEP.UseHands = true
@ -186,7 +191,7 @@ function SWEP:Deploy()
if SERVER then if SERVER then
self:SetCombo(0) self:SetCombo(0)
end end
self.Owner:ResetSpeed()
return true return true
end end
@ -199,7 +204,11 @@ function SWEP:Think()
if idle_holdtype_time > 0 and curtime >= idle_holdtype_time then if idle_holdtype_time > 0 and curtime >= idle_holdtype_time then
--self:SetWeaponHoldType("normal") --self:SetWeaponHoldType("normal")
self:SetNextIdleHoldType(0) self:SetNextIdleHoldType(0)
self.WalkSpeed = SPEED_NORMAL if GAMEMODE.ZombieEscape then
self.WalkSpeed = SPEED_ZOMBIEESCAPE_NORMAL
else
self.WalkSpeed = SPEED_NORMAL
end
self.Owner:ResetSpeed() self.Owner:ResetSpeed()
end end