use landgun anim if player has a gun

This commit is contained in:
Jonny_Bro (Nikita) 2023-10-21 12:32:11 +05:00
parent 77f6f2ad08
commit 4ba59ed732

View file

@ -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