Compare commits

...

4 commits

2 changed files with 10 additions and 4 deletions

View file

@ -8,6 +8,10 @@ elseif CLIENT and game.SinglePlayer() then
net.Receive("CrouchJumpSP", function()
local ply = LocalPlayer()
if ply:GetMoveType() == MOVETYPE_NOCLIP then
return
end
if BodyAnimArmCopy then
BodyAnimCycle = 0
BodyAnimCrouchLerp = 0
@ -29,6 +33,10 @@ hook.Add("SetupMove", "CrouchJump", function(ply, mv, cmd)
ply:SetCrouchJumpBlocked(false)
end
if ply:GetMoveType() == MOVETYPE_NOCLIP then
return
end
local activewep = ply:GetActiveWeapon()
if ply:Alive() and not ply:GetCrouchJumpBlocked() and not IsValid(ply:GetZipline()) and not IsValid(ply:GetLadder()) and ply:GetClimbing() == 0 and not ply:GetJumpTurn() and ply:GetMantle() == 0 and not ply:OnGround() and ply:GetVelocity().z > -350 and ply:GetCrouchJumpTime() < CurTime() and ply:GetWallrun() == 0 and mv:KeyPressed(IN_DUCK) then

View file

@ -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() * 250 + 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()