diff --git a/beatrun/gamemodes/beatrun/gamemode/cl/ToolMenuSettings.lua b/beatrun/gamemodes/beatrun/gamemode/cl/ToolMenuSettings.lua index cc74374..6122d63 100644 --- a/beatrun/gamemodes/beatrun/gamemode/cl/ToolMenuSettings.lua +++ b/beatrun/gamemodes/beatrun/gamemode/cl/ToolMenuSettings.lua @@ -137,13 +137,16 @@ hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function() spawnmenu.AddToolMenuOption("Beatrun", "Client", "beatrun_gameplay", "Gameplay", "", "", function(panel) panel:ClearControls() - panel:SetName("Gameplaye Settings") + panel:SetName("Gameplay Settings") panel:CheckBox("Quickturn", "Beatrun_QuickturnGround") panel:ControlHelp("Enables quickturning with secondary attack while on the ground") panel:CheckBox("Purist Mode", "Beatrun_PuristMode") panel:ControlHelp("Purist mode is a clientside preference that severely weakens the ability to strafe while in the air, which is how Mirror's Edge games handle this.\nDisabled = No restrictions\nEnabled = Reduced move speed in the air") + + panel:CheckBox("Disable Grapple Ability", "Beatrun_DisableGrapple") + panel:ControlHelp("Disables grapple ability") end) spawnmenu.AddToolMenuOption("Beatrun", "Server", "beatrun_main", "Main", "", "", function(panel) diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Grapple.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Grapple.lua index 6b98520..1f2ceaa 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Grapple.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Grapple.lua @@ -1,9 +1,12 @@ +local disable_grapple = CreateClientConVar("Beatrun_DisableGrapple", 0, true, true, "Disables grapple ability", 0, 1) + if CLIENT then local circle = Material("circlesmooth.png", "nocull smooth") hook.Add("HUDPaint", "grappleicon", function() local ply = LocalPlayer() + if disable_grapple:GetBool() then return end if ply:GetMantle() ~= 0 or ply:GetClimbing() ~= 0 then return end if not ply:Alive() or Course_Name ~= "" then return end @@ -52,6 +55,7 @@ end local zpunchstart = Angle(2, 0, 0) hook.Add("SetupMove", "Grapple", function(ply, mv, cmd) + if ply:GetInfoNum("Beatrun_DisableGrapple", 0) == 1 then return end if ply:GetMantle() ~= 0 or ply:GetClimbing() ~= 0 then return end if not ply:Alive() or Course_Name ~= "" and ply:GetNW2Int("CPNum", 1) ~= -1 and not ply:GetNW2Entity("Swingrope"):IsValid() then return end if GetGlobalBool(GM_INFECTION) or GetGlobalBool(GM_DATATHEFT) and not ply:GetNW2Entity("Swingrope"):IsValid() then return end