From 74a9f6de4c3935d1b1e553e46c9fb44605f3cdbb Mon Sep 17 00:00:00 2001 From: shen Date: Fri, 7 Jun 2024 11:35:12 +0300 Subject: [PATCH] CrouchJump will not work if noclip is activated, so no more camera locks in build mode! --- beatrun/gamemodes/beatrun/gamemode/sh/CrouchJump.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/CrouchJump.lua b/beatrun/gamemodes/beatrun/gamemode/sh/CrouchJump.lua index fb5496b..12998ab 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/CrouchJump.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/CrouchJump.lua @@ -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