This commit is contained in:
Jonny_Bro (Nikita) 2023-06-11 00:47:27 +05:00
parent 7d80aa64a1
commit 9f62794e94

View file

@ -459,8 +459,7 @@ local lerpedpos = Vector()
local lastlockang = false local lastlockang = false
local lastlockangstart = Angle() local lastlockangstart = Angle()
local lasteyeang = Angle() local lasteyeang = Angle()
local updatethirdpersonshit = true local updatethirdperson = true
-- local lerpedang = Vector()
function BodyAnimCalcView2(ply, pos, angles, fov) function BodyAnimCalcView2(ply, pos, angles, fov)
if ply:InVehicle() then if ply:InVehicle() then
@ -470,15 +469,16 @@ function BodyAnimCalcView2(ply, pos, angles, fov)
end end
if IsValid(BodyAnim) and pos:Distance(ply:EyePos()) > 10 then if IsValid(BodyAnim) and pos:Distance(ply:EyePos()) > 10 then
if updatethirdpersonshit then if updatethirdperson then
ply:SetNoDraw(false) ply:SetNoDraw(false)
BodyAnim:SetNoDraw(true) BodyAnim:SetNoDraw(true)
BodyAnim:SetRenderOrigin(pos * 1000) BodyAnim:SetRenderOrigin(pos * 1000)
updatethirdpersonshit = false updatethirdperson = false
end end
return return
else else
updatethirdpersonshit = true updatethirdperson = true
end end