zombiesurvival-evolved/gamemodes/zombiesurvival/entities/weapons/weapon_zs_base/init.lua

19 lines
432 B
Lua
Raw Normal View History

INC_SERVER()
2014-10-02 08:49:54 +08:00
AddCSLuaFile("animations.lua")
2014-10-02 08:49:54 +08:00
function SWEP:Think()
if self:GetIronsights() and not self:GetOwner():KeyDown(IN_ATTACK2) then
2014-10-02 08:49:54 +08:00
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
2014-10-02 08:49:54 +08:00
end