From a73296f92726ce03f5311a3171e62be25b8ef607 Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Mon, 4 Sep 2023 22:37:55 +0500 Subject: [PATCH] kinda fixed sliding S roll (quickturn) --- beatrun/gamemodes/beatrun/gamemode/sh/Quickturn.lua | 2 +- beatrun/gamemodes/beatrun/gamemode/sh/Sliding.lua | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Quickturn.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Quickturn.lua index 84857fb..5d26114 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Quickturn.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Quickturn.lua @@ -98,7 +98,7 @@ local function Quickturn(ply, mv, cmd) elseif (lookahead or lookbehind) and ply:WaterLevel() < 3 and not IsValid(ply:GetSwingbar()) and not IsValid(ply:GetZipline()) then if CLIENT and IsFirstTimePredicted() then DoJumpTurn(lookbehind) - elseif SERVER and game.SinglePlayer() then + elseif game.SinglePlayer() then ply:SendLua("DoJumpTurn(" .. tostring(lookbehind) .. ")") end diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Sliding.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Sliding.lua index d7915e0..d88ae1a 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Sliding.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Sliding.lua @@ -578,7 +578,7 @@ hook.Add("SetupMove", "qslide", function(ply, mv, cmd) end if mv:KeyPressed(IN_BACK) and ply:GetMelee() == 0 and ply:GetSlidingTime() < CT + slidetime * 0.95 then - if CLIENT or game.SinglePlayer() then + if CLIENT and IsFirstTimePredicted() or game.SinglePlayer() then cmd:SetViewAngles(ply:GetSlidingAngle()) end @@ -589,14 +589,16 @@ hook.Add("SetupMove", "qslide", function(ply, mv, cmd) ply:SetQuickturnTime(CT) ply:SetQuickturnAng(cmd:GetViewAngles()) - if CLIENT then + if CLIENT and IsFirstTimePredicted() then DoJumpTurn(false) elseif game.SinglePlayer() then ply:SendLua("DoJumpTurn(false)") end ply:SetJumpTurn(true) + ply:ViewPunch(Angle(2.5, 0, 5)) + ply:SetViewOffsetDucked(Vector(0, 0, 17)) ply:SetViewOffset(Vector(0, 0, 64))