From 70aebef7837a722d3741b3ae5ef660fd97e8219d Mon Sep 17 00:00:00 2001 From: shen Date: Fri, 7 Jun 2024 10:43:00 +0300 Subject: [PATCH] Fixed "ground" roll. Enabled "Lose speed on roll" will reduce your speed based on the speed limit --- beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua b/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua index 52d58d0..cc2d6e7 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua @@ -39,11 +39,11 @@ local function SafetyRollThink(ply, mv, cmd) vel.y = 0 local con = GetConVar("Beatrun_LoseSpeedOnRoll") + local speedLimit = GetConVar("Beatrun_SpeedLimit"):GetFloat() if (con:GetBool()) then - mv:SetVelocity(ang:Forward() * 225 + vel) + mv:SetVelocity(ang:Forward() * (speedLimit / 2) + vel) else - local speedLimit = GetConVar("Beatrun_SpeedLimit"):GetFloat() local max = math.max(250, math.Clamp(lastGroundSpeed, 200, speedLimit + 50)) mv:SetVelocity(ang:Forward() * (max + 40)) end @@ -128,8 +128,6 @@ hook.Add("SetupMove", "EvadeRoll", function(ply, mv, cmd) ply:EmitSound("Land.Concrete") end - BodyAnim:SetAngles(Angle(0, ply:EyeAngles().y, 0)) - if CLIENT and IsFirstTimePredicted() then CacheBodyAnim() RemoveBodyAnim()