fix error on death

This commit is contained in:
Jonny_Bro (Nikita) 2025-02-14 20:56:18 +05:00
parent 43410109dd
commit 2c8d2671bc
2 changed files with 3 additions and 3 deletions

View file

@ -136,7 +136,7 @@ function RemoveBodyAnim(noang)
local currentwep = ply:GetActiveWeapon()
local vm = ply:GetViewModel()
if not ply:UsingRH() then
if ply:Alive() and not ply:UsingRH() then
if currentwep.PlayViewModelAnimation then
currentwep:PlayViewModelAnimation("Draw")
else

View file

@ -72,9 +72,9 @@ function playermeta:SetWallrunData(wr, wrtime, dir)
end
function playermeta:UsingRH(wep)
local activewep = wep or self:GetActiveWeapon()
wep = wep or self:GetActiveWeapon()
if IsValid(activewep) and activewep:GetClass() == "runnerhands" then
if IsValid(wep) and wep:GetClass() == "runnerhands" then
return true
else
return false