no inspect spam with fireasap

This commit is contained in:
Darsu 2024-08-12 01:39:16 +07:00
parent ca1bbc80da
commit c52c3afcc1
2 changed files with 4 additions and 3 deletions

View File

@ -133,8 +133,8 @@ function SWEP:PlayAnimation(anim, mult, lock, delayidle, noproxy, notranslate, n
end)
end
self:SetIKAnimation(anim) -- used not only in ik but for getting cur anim
if animation.IKTimeLine then
self:SetIKAnimation(anim)
self:SetIKTimeLineStart(CurTime())
self:SetIKTime(time * mult)
end

View File

@ -5,10 +5,11 @@ function SWEP:ThinkInspect()
if self:GetUBGL() and !self:HasAnimation("inspect_ubgl") then return end
local owner = self:GetOwner()
local ininspectrn = string.find(self:GetIKAnimation() or "", "inspect")
-- self:PlayAnimation("inspect", 1, true)
if (owner:KeyDown(IN_USE) and owner:KeyDown(IN_RELOAD)) or owner:KeyDown(ARC9.IN_INSPECT) then
if !self:HasAnimation("enter_inspect") then
if !self:HasAnimation("enter_inspect") and !ininspectrn then
self:PlayAnimation("inspect", 1, true)
return
end