From 4ba59ed73214f3f3aea0a1710278635baed6f58a Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Sat, 21 Oct 2023 12:32:11 +0500 Subject: [PATCH] use landgun anim if player has a gun --- .../gamemodes/beatrun/gamemode/sh/SafetyRoll.lua | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua b/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua index 7b50618..fea11c3 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua @@ -60,7 +60,11 @@ net.Receive("RollAnimSP", function() local ply = LocalPlayer() if net.ReadBool() then - roll.AnimString = "land" + if ply:UsingRH() then + roll.AnimString = "land" + else + roll.AnimString = "landgun" + end roll.animmodelstring = "climbanim" roll.BodyAnimSpeed = 1 elseif net.ReadBool() then @@ -163,7 +167,12 @@ hook.Add("OnPlayerHitGround", "SafetyRoll", function(ply, water, floater, speed) ply:SetSafetyRollAng(landang) ply:SetSafetyRollTime(CurTime() + 0.6) - roll.AnimString = "land" + if ply:UsingRH() then + roll.AnimString = "land" + else + roll.AnimString = "landgun" + end + roll.animmodelstring = "climbanim" roll.usefullbody = true else