From 7b03b16ea7b80071094528a6d57d69f3cc3c2b0a Mon Sep 17 00:00:00 2001 From: relaxtakenotes <91839650+relaxtakenotes@users.noreply.github.com> Date: Sun, 22 Dec 2024 16:05:37 +0500 Subject: [PATCH] attempt 2 at fixing the slide-roll bug --- beatrun/gamemodes/beatrun/gamemode/sh/Grapple.lua | 7 ++++--- beatrun/gamemodes/beatrun/gamemode/sh/Sliding.lua | 9 +++------ beatrun/gamemodes/beatrun/gamemode/shared.lua | 2 +- version.txt | 2 +- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Grapple.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Grapple.lua index 646d91f..9688ef0 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Grapple.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Grapple.lua @@ -205,8 +205,8 @@ hook.Add("SetupMove", "Grapple", function(ply, mv, cmd) tr.endpos = mv:GetOrigin() local mins, maxs = ply:GetHull() - mins:Mul(1.01) - maxs:Mul(1.01) + mins:Mul(1.05) + maxs:Mul(1.05) tr.mins = mins tr.maxs = maxs @@ -219,9 +219,10 @@ hook.Add("SetupMove", "Grapple", function(ply, mv, cmd) vel:Normalize() 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 + mv:SetVelocity(mv:GetVelocity() - vel * (ply:GetGrapplePos():Distance(pos) - ply:GetGrappleLength())) end diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Sliding.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Sliding.lua index cb3bce9..432c675 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Sliding.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Sliding.lua @@ -246,7 +246,7 @@ end hook.Add("SetupMove", "qslide", function(ply, mv, cmd) 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 ply.OldDuckSpeed = ply:GetDuckSpeed() @@ -366,11 +366,8 @@ hook.Add("SetupMove", "qslide", function(ply, mv, cmd) end end - local isRolling = CurTime() < ply:GetSafetyRollKeyTime() - local turnedInAir = ply:GetJumpTurn() - //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 + if not ply:GetSliding() and not ply:GetJumpTurn() and ply:Alive() and + (ply:GetSlidingDelay() < CT) and ducking and ((ducking and sprinting and speed > runspeed * 0.5) or slippery or ply:GetDive()) then vel = math.min(speed, 541.44) * ply:GetOverdriveMult() diff --git a/beatrun/gamemodes/beatrun/gamemode/shared.lua b/beatrun/gamemodes/beatrun/gamemode/shared.lua index ba71903..9560b16 100644 --- a/beatrun/gamemodes/beatrun/gamemode/shared.lua +++ b/beatrun/gamemodes/beatrun/gamemode/shared.lua @@ -1,4 +1,4 @@ -VERSION_GLOBAL = "1.0.27" +VERSION_GLOBAL = "1.0.28" VERSION_LATEST = "" VERSION_CHECKED = false diff --git a/version.txt b/version.txt index 3f11ef6..f8536a4 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.0.27 \ No newline at end of file +1.0.28 \ No newline at end of file