mirror of
https://github.com/JonnyBro/beatrun.git
synced 2024-12-27 20:43:02 +05:00
attempt 2 at fixing the slide-roll bug
This commit is contained in:
parent
e2c298d9fa
commit
7b03b16ea7
4 changed files with 9 additions and 11 deletions
|
@ -205,8 +205,8 @@ hook.Add("SetupMove", "Grapple", function(ply, mv, cmd)
|
||||||
tr.endpos = mv:GetOrigin()
|
tr.endpos = mv:GetOrigin()
|
||||||
|
|
||||||
local mins, maxs = ply:GetHull()
|
local mins, maxs = ply:GetHull()
|
||||||
mins:Mul(1.01)
|
mins:Mul(1.05)
|
||||||
maxs:Mul(1.01)
|
maxs:Mul(1.05)
|
||||||
|
|
||||||
tr.mins = mins
|
tr.mins = mins
|
||||||
tr.maxs = maxs
|
tr.maxs = maxs
|
||||||
|
@ -219,9 +219,10 @@ hook.Add("SetupMove", "Grapple", function(ply, mv, cmd)
|
||||||
vel:Normalize()
|
vel:Normalize()
|
||||||
|
|
||||||
if not trout.Hit then
|
if not trout.Hit then
|
||||||
mv:SetOrigin(mv:GetOrigin() - vel * (ply:GetGrapplePos():Distance(pos) - ply:GetGrappleLength() - 10))
|
mv:SetOrigin(mv:GetOrigin() - vel * (ply:GetGrapplePos():Distance(pos) - ply:GetGrappleLength()))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
mv:SetVelocity(mv:GetVelocity() - vel * (ply:GetGrapplePos():Distance(pos) - ply:GetGrappleLength()))
|
mv:SetVelocity(mv:GetVelocity() - vel * (ply:GetGrapplePos():Distance(pos) - ply:GetGrappleLength()))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -246,7 +246,7 @@ end
|
||||||
|
|
||||||
hook.Add("SetupMove", "qslide", function(ply, mv, cmd)
|
hook.Add("SetupMove", "qslide", function(ply, mv, cmd)
|
||||||
if not ply:Alive() then return end
|
if not ply:Alive() then return end
|
||||||
if ply:GetSafetyRollKeyTime() > CurTime() then return end
|
if ply:GetSafetyRollTime() > CurTime() then return end
|
||||||
|
|
||||||
if not ply.OldDuckSpeed then
|
if not ply.OldDuckSpeed then
|
||||||
ply.OldDuckSpeed = ply:GetDuckSpeed()
|
ply.OldDuckSpeed = ply:GetDuckSpeed()
|
||||||
|
@ -366,11 +366,8 @@ hook.Add("SetupMove", "qslide", function(ply, mv, cmd)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local isRolling = CurTime() < ply:GetSafetyRollKeyTime()
|
if not ply:GetSliding() and not ply:GetJumpTurn() and ply:Alive() and
|
||||||
local turnedInAir = ply:GetJumpTurn()
|
(ply:GetSlidingDelay() < CT) and ducking and
|
||||||
//if ply:GetSlidingDelay() < CT and ply:Alive() and (ducking and sprinting and speed > runspeed * 0.5 or slippery and ply:GetSafetyRollTime() <= CurTime() + 0.25 or ply:GetDive() and ply:GetSafetyRollKeyTime() <= CurTime()) and onground and not sliding then
|
|
||||||
if not ply:GetSliding() and not isRolling and not turnedInAir and ply:Alive() and
|
|
||||||
(ply:GetSlidingDelay() < CT) and
|
|
||||||
((ducking and sprinting and speed > runspeed * 0.5) or slippery or ply:GetDive()) then
|
((ducking and sprinting and speed > runspeed * 0.5) or slippery or ply:GetDive()) then
|
||||||
vel = math.min(speed, 541.44) * ply:GetOverdriveMult()
|
vel = math.min(speed, 541.44) * ply:GetOverdriveMult()
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
VERSION_GLOBAL = "1.0.27"
|
VERSION_GLOBAL = "1.0.28"
|
||||||
VERSION_LATEST = ""
|
VERSION_LATEST = ""
|
||||||
VERSION_CHECKED = false
|
VERSION_CHECKED = false
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
1.0.27
|
1.0.28
|
Loading…
Reference in a new issue