From 2c8d2671bc933a20cdf0635ad2c9a7941483d577 Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" <48434875+JonnyBro@users.noreply.github.com> Date: Fri, 14 Feb 2025 20:56:18 +0500 Subject: [PATCH] fix error on death --- beatrun/gamemodes/beatrun/gamemode/cl/BodyAnim.lua | 2 +- beatrun/gamemodes/beatrun/gamemode/sh/!Helpers.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/beatrun/gamemodes/beatrun/gamemode/cl/BodyAnim.lua b/beatrun/gamemodes/beatrun/gamemode/cl/BodyAnim.lua index 773df3b..2c7a2af 100644 --- a/beatrun/gamemodes/beatrun/gamemode/cl/BodyAnim.lua +++ b/beatrun/gamemodes/beatrun/gamemode/cl/BodyAnim.lua @@ -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 diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/!Helpers.lua b/beatrun/gamemodes/beatrun/gamemode/sh/!Helpers.lua index 8144796..208fb7e 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/!Helpers.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/!Helpers.lua @@ -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