mirror of
https://github.com/JonnyBro/beatrun.git
synced 2024-12-29 05:13:02 +05:00
disable firstperson body anims if in thirdperson
This commit is contained in:
parent
d6c2c6e974
commit
afd509d6ce
1 changed files with 14 additions and 0 deletions
|
@ -459,6 +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 lerpedang = Vector()
|
-- local lerpedang = Vector()
|
||||||
|
|
||||||
function BodyAnimCalcView2(ply, pos, angles, fov)
|
function BodyAnimCalcView2(ply, pos, angles, fov)
|
||||||
|
@ -468,6 +469,19 @@ function BodyAnimCalcView2(ply, pos, angles, fov)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if IsValid(BodyAnim) and pos:Distance(ply:EyePos()) > 10 then
|
||||||
|
if updatethirdpersonshit then
|
||||||
|
ply:SetNoDraw(false)
|
||||||
|
BodyAnim:SetNoDraw(true)
|
||||||
|
BodyAnim:SetRenderOrigin(pos*1000)
|
||||||
|
updatethirdpersonshit = false
|
||||||
|
end
|
||||||
|
return
|
||||||
|
else
|
||||||
|
updatethirdpersonshit = true
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
if IsValid(BodyAnim) or attach ~= nil then
|
if IsValid(BodyAnim) or attach ~= nil then
|
||||||
if IsValid(BodyAnim) then
|
if IsValid(BodyAnim) then
|
||||||
if followplayer then
|
if followplayer then
|
||||||
|
|
Loading…
Reference in a new issue