zombiesurvival-evolved/gamemodes/zombiesurvival/entities/weapons/weapon_zs_base/init.lua
William Moodhe e9da54c2f9 ZS updates for 2014-2018
Too many changes to list.
2018-05-01 18:32:59 -04:00

18 lines
432 B
Lua

INC_SERVER()
AddCSLuaFile("animations.lua")
function SWEP:Think()
if self:GetIronsights() and not self:GetOwner():KeyDown(IN_ATTACK2) then
self:SetIronsights(false)
end
if self:GetReloadFinish() > 0 then
if CurTime() >= self:GetReloadFinish() then
self:FinishReload()
end
elseif self.IdleAnimation and self.IdleAnimation <= CurTime() then
self.IdleAnimation = nil
self:SendWeaponAnim(self.IdleActivity)
end
end