mirror of
https://github.com/JonnyBro/beatrun.git
synced 2024-12-29 05:13:02 +05:00
Fixed "ground" roll. Enabled "Lose speed on roll" will reduce your speed based on the speed limit
This commit is contained in:
parent
cf179a2730
commit
70aebef783
1 changed files with 2 additions and 4 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue