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