diff --git a/beatrun/gamemodes/beatrun/gamemode/cl/ToolMenuSettings.lua b/beatrun/gamemodes/beatrun/gamemode/cl/ToolMenuSettings.lua index 7afd21e..bdd2485 100644 --- a/beatrun/gamemodes/beatrun/gamemode/cl/ToolMenuSettings.lua +++ b/beatrun/gamemodes/beatrun/gamemode/cl/ToolMenuSettings.lua @@ -412,10 +412,24 @@ hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function() end) spawnmenu.AddToolMenuOption("Beatrun", "Server", "beatrun_serverfun", "Fun", "", "", function(panel) + local funoptions = vgui.Create("DForm") + local experimentals = vgui.Create("DForm") panel:ClearControls() panel:SetName("Fun/Experimental Settings") - panel:CheckBox("Cruelty Parkour (?)", "Beatrun_CrueltyParkour") - panel:ControlHelp("\"Funny\" optional feature that blocks some parkour moves and changes some moves\' behavior with a different weapon out.") + panel:Help("Some settings that may not be very practical, are very hacky or are just for fun.") + panel:ControlHelp("Note: For checkboxes, ticked is ON and unticked/empty box is OFF.") + + panel:AddItem(funoptions) + panel:AddItem(experimentals) + + funoptions:SetName("The Fun Optionsā„¢") + + funoptions:CheckBox("Cruelty Parkour (?)", "Beatrun_CrueltyParkour") + funoptions:ControlHelp("\"Funny\" optional feature that blocks some parkour moves and changes some moves\' behavior with a different weapon out.") + + experimentals:SetName("Experimental Thingsā„¢") + experimentals:CheckBox("\"Slippy Wallruns\"", "Beatrun_Experimentals_SlippyWallrun") + experimentals:ControlHelp("You randomly drop from wallruns with a different weapon out. Requires Cruelty Parkour to be ON.") end) end) diff --git a/beatrun/gamemodes/beatrun/gamemode/preexecute/shared.lua b/beatrun/gamemodes/beatrun/gamemode/preexecute/shared.lua index 4c267d9..bc8db57 100644 --- a/beatrun/gamemodes/beatrun/gamemode/preexecute/shared.lua +++ b/beatrun/gamemodes/beatrun/gamemode/preexecute/shared.lua @@ -1 +1,3 @@ -CrueltyParkour = CreateConVar("Beatrun_CrueltyParkour", 0, {FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Also known as \"Cruelty Mode\".\nDisables some Beatrun parkour abilities using anything but the Beatrun hands when enabled.", 0, 1) \ No newline at end of file +CrueltyParkour = CreateConVar("Beatrun_CrueltyParkour", 0, {FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Also known as \"Cruelty Mode\".\nDisables some Beatrun parkour abilities using anything but the Beatrun hands when enabled.", 0, 1) + +SlippyWallrun = CreateConVar("Beatrun_Experimentals_SlippyWallrun", 0, {FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Makes your wallrun slippy. Only usable with Cruelty Parkour on.", 0, 1) \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Swingbar.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Swingbar.lua index 9d56f8f..d3a8710 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Swingbar.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Swingbar.lua @@ -20,39 +20,41 @@ local function SwingbarCheck(ply, mv, cmd) util.TraceHull(tr) if IsValid(trout.Entity) and trout.Entity:GetClass() == "br_swingbar" and (ply:GetSwingbarLast() ~= trout.Entity or ply:GetSBDelay() < CurTime()) then - local swingbar = trout.Entity - local dot = cmd:GetViewAngles():Forward():Dot(swingbar:GetAngles():Forward()) - local dir = dot > 0 and true or false + if CrueltyParkour:GetBool() and !ply:UsingRH() then + local swingbar = trout.Entity + local dot = cmd:GetViewAngles():Forward():Dot(swingbar:GetAngles():Forward()) + local dir = dot > 0 and true or false - if math.abs(dot) < 0.7 then return end + if math.abs(dot) < 0.7 then return end - if CLIENT then - swingbar:SetPredictable(true) - end + if CLIENT then + swingbar:SetPredictable(true) + end - ply:SetSwingbar(swingbar) - ply:SetWallrunTime(0) - ply:SetWallrunCount(0) - ply:SetSBDir(dir) - ply:SetSBStartLerp(0) - ply:SetSBOffset(30) - ply:SetSBPeak(0) - ply:SetDive(false) - ply:SetCrouchJump(false) + ply:SetSwingbar(swingbar) + ply:SetWallrunTime(0) + ply:SetWallrunCount(0) + ply:SetSBDir(dir) + ply:SetSBStartLerp(0) + ply:SetSBOffset(30) + ply:SetSBPeak(0) + ply:SetDive(false) + ply:SetCrouchJump(false) - ParkourEvent("swingbar", ply) + ParkourEvent("swingbar", ply) - mv:SetVelocity(vector_origin) + mv:SetVelocity(vector_origin) - if mv:KeyDown(IN_FORWARD) or mv:GetVelocity():Length() > 150 then - ply:SetSBOffsetSpeed(2) - else - ply:SetSBOffsetSpeed(0) - end + if mv:KeyDown(IN_FORWARD) or mv:GetVelocity():Length() > 150 then + ply:SetSBOffsetSpeed(2) + else + ply:SetSBOffsetSpeed(0) + end - if CLIENT and IsFirstTimePredicted() or game.SinglePlayer() then - ply:EmitSound("Handsteps.ConcreteHard") + if CLIENT and IsFirstTimePredicted() or game.SinglePlayer() then + ply:EmitSound("Handsteps.ConcreteHard") + end end end end @@ -137,7 +139,7 @@ local function SwingbarThink(ply, mv, cmd) offset = ply:GetSBOffset() - if mv:KeyPressed(IN_JUMP) or mv:KeyDown(IN_JUMP) and offset > 90 then + if mv:KeyPressed(IN_JUMP) or mv:KeyDown(IN_JUMP) and offset > 90 or (CrueltyParkour:GetBool() and !ply:UsingRH()) then print("ONE") ParkourEvent("swingjump", ply) @@ -189,21 +191,6 @@ local function Swingbar(ply, mv, cmd) if IsValid(ply:GetSwingbar()) then SwingbarThink(ply, mv, cmd) end - - if CrueltyParkour:GetBool() and !ply:UsingRH() then - ParkourEvent("swingjump", ply) - - local ang = cmd:GetViewAngles() - ang.x = 0 - - ply:SetMoveType(MOVETYPE_WALK) - ply:SetSwingbarLast(ply:GetSwingbar()) - ply:SetSwingbar(nil) - ply:SetWallrunDir(dummyvec) - - ply:SetMEMoveLimit(GetConVar("Beatrun_SpeedLimit"):GetInt()) - ply:SetMESprintDelay(-1) - end end hook.Add("SetupMove", "Swingbar", Swingbar) \ No newline at end of file