mirror of
https://github.com/JonnyBro/beatrun.git
synced 2024-12-29 21:33:02 +05:00
Fix model disappear when sliding at max speed
This commit is contained in:
parent
04dea4c70f
commit
12bbbf201a
7 changed files with 25 additions and 2 deletions
|
@ -468,7 +468,7 @@ function BodyAnimCalcView2(ply, pos, angles, fov)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if IsValid(BodyAnim) and pos:Distance(ply:EyePos()) > 10 then
|
if IsValid(BodyAnim) and pos:Distance(ply:EyePos()) > 20 then -- This is the issue with disappearing model when sliding
|
||||||
if updatethirdperson then
|
if updatethirdperson then
|
||||||
ply:SetNoDraw(false)
|
ply:SetNoDraw(false)
|
||||||
BodyAnim:SetNoDraw(true)
|
BodyAnim:SetNoDraw(true)
|
||||||
|
@ -481,7 +481,6 @@ function BodyAnimCalcView2(ply, pos, angles, fov)
|
||||||
updatethirdperson = true
|
updatethirdperson = true
|
||||||
end
|
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
|
||||||
|
|
|
@ -222,6 +222,30 @@ local function ClimbingThink(ply, mv, cmd)
|
||||||
|
|
||||||
util.TraceHull(tr)
|
util.TraceHull(tr)
|
||||||
|
|
||||||
|
--[[ TODO: Make this work
|
||||||
|
for i = -64, 64, 1 do
|
||||||
|
tr.endpos = tr.start + Vector(i, mins.z, maxs.z)
|
||||||
|
|
||||||
|
util.TraceHull(tr)
|
||||||
|
|
||||||
|
print(trout.Hit)
|
||||||
|
print(tr.endpos)
|
||||||
|
|
||||||
|
if not trout.Hit then
|
||||||
|
tr.start = tr.endpos
|
||||||
|
tr.endpos = tr.start - ply:GetClimbingAngle():Forward() * 20
|
||||||
|
|
||||||
|
util.TraceHull(tr)
|
||||||
|
|
||||||
|
if not trout.Hit then
|
||||||
|
ply:SetClimbingEnd(tr.endpos)
|
||||||
|
ply:SetClimbing(2)
|
||||||
|
ParkourEvent("climbheave", ply)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--]]
|
||||||
|
|
||||||
if not trout.Hit then
|
if not trout.Hit then
|
||||||
tr.start = ply:GetClimbingEnd()
|
tr.start = ply:GetClimbingEnd()
|
||||||
tr.endpos = tr.start - ply:GetClimbingAngle():Forward() * 20
|
tr.endpos = tr.start - ply:GetClimbingAngle():Forward() * 20
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue