diff --git a/beatrun/gamemodes/beatrun/gamemode/cl/DebugInfo.lua b/beatrun/gamemodes/beatrun/gamemode/cl/DebugInfo.lua index c19fd70..9ed674d 100644 --- a/beatrun/gamemodes/beatrun/gamemode/cl/DebugInfo.lua +++ b/beatrun/gamemodes/beatrun/gamemode/cl/DebugInfo.lua @@ -68,6 +68,19 @@ local function DrawDebugInfo() surface.DrawText(text) end end + + local counter = 0 + + surface.SetTextColor(255, 255, 255, 255) + surface.SetTextPos(100, 100) + surface.DrawText("Removing Control:") + + for k, v in pairs(removingbuttons) do + if SysTime() - v > 30 then continue end + counter = counter + 1 + surface.SetTextPos(100, 100 + counter * 16) + surface.DrawText(k .. ": " .. math.Round(v, 2)) + end end local function RenderTraces() diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/!Helpers.lua b/beatrun/gamemodes/beatrun/gamemode/sh/!Helpers.lua index a46d66f..ae20da4 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/!Helpers.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/!Helpers.lua @@ -1,3 +1,17 @@ +removingbuttons = {} + +if SERVER then + hook.Add("Think", "removingbuttonsprint", function() + if engine.TickCount() % 10 == 0 then + for i, ply in ipairs(player.GetAll()) do + for path, time in pairs(removingbuttons) do + ply:SendLua("removingbuttons[" .. "\"" .. path .. "\"" .. "] = " .. " \"" .. time .. " \"") + end + end + end + end) +end + local vmatrixmeta = FindMetaTable("VMatrix") local playermeta = FindMetaTable("Player") diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Climb.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Climb.lua index a1fe372..ad455ba 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Climb.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Climb.lua @@ -110,6 +110,7 @@ local function ClimbingThink(ply, mv, cmd) ply:SetClimbingDelay(CurTime() + 1.35) end + removingbuttons["Climb.lua:113"] = SysTime() mv:SetForwardSpeed(0) mv:SetSideSpeed(0) mv:SetUpSpeed(0) @@ -120,6 +121,8 @@ local function ClimbingThink(ply, mv, cmd) end if (ply:GetClimbing() == 2 or ply:GetClimbing() == 6) and ply:GetClimbingTime() >= 1 then + removingbuttons["Climb.lua:123"] = SysTime() + mv:SetButtons(0) mv:SetForwardSpeed(0) mv:SetSideSpeed(0) @@ -152,6 +155,7 @@ local function ClimbingThink(ply, mv, cmd) ply:SetMoveType(MOVETYPE_WALK) + removingbuttons["Climb.lua:157"] = SysTime() mv:SetButtons(0) ply:SetClimbing(0) @@ -177,6 +181,7 @@ local function ClimbingThink(ply, mv, cmd) if mv:KeyDown(IN_JUMP) and ang > 42 then mv:SetOrigin(ply:GetClimbingStart() - ply:GetClimbingAngle():Forward() * 0.6) ply:SetMoveType(MOVETYPE_WALK) + removingbuttons["Climb.lua:183"] = SysTime() mv:SetButtons(0) ply:SetClimbing(0) ply:SetSafetyRollKeyTime(CurTime() + 0.1) @@ -386,6 +391,7 @@ local function ClimbingThink(ply, mv, cmd) ply:SetClimbingTime(lerp + FrameTime() * lerprate) end + removingbuttons["Climb.lua:394"] = SysTime() mv:SetForwardSpeed(0) mv:SetSideSpeed(0) mv:SetUpSpeed(0) @@ -767,6 +773,7 @@ local function ClimbingCheck(ply, mv, cmd) ply:ConCommand("-jump") end + removingbuttons["Climb.lua:774"] = SysTime() mv:SetButtons(0) mv:SetForwardSpeed(0) mv:SetSideSpeed(0) diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Dive.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Dive.lua index 1120744..ed6da20 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Dive.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Dive.lua @@ -91,6 +91,7 @@ local function Dive(ply, mv, cmd) ply.DiveSliding = true ply:SetDive(false) elseif ply:OnGround() and mv:KeyDown(IN_BULLRUSH) then + removingbuttons["Dive.lua:94"] = SysTime() mv:SetButtons(0) end end diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Ladder.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Ladder.lua index 9b4eff4..912826c 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Ladder.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Ladder.lua @@ -78,6 +78,8 @@ local function LadderCheck(ply, mv, cmd, ladder) end local function LadderThink(ply, mv, cmd, ladder) + removingbuttons["Ladder.lua:81"] = SysTime() + mv:SetForwardSpeed(0) mv:SetSideSpeed(0) @@ -245,6 +247,7 @@ local function LadderThink(ply, mv, cmd, ladder) return end + removingbuttons["Ladder.lua:248"] = SysTime() mv:SetVelocity(vector_origin) mv:SetButtons(0) end diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Quickturn.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Quickturn.lua index dcc3fdf..2b68fa8 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Quickturn.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Quickturn.lua @@ -146,6 +146,7 @@ local function Quickturn(ply, mv, cmd) end if ply:GetJumpTurn() then + removingbuttons["Quickturn.lua:149"] = SysTime() mv:SetForwardSpeed(0) mv:SetSideSpeed(0) mv:SetUpSpeed(0) @@ -179,10 +180,12 @@ local function Quickturn(ply, mv, cmd) end if CurTime() < ply:GetJumpTurnRecovery() then + removingbuttons["Quickturn.lua:183"] = SysTime() mv:SetForwardSpeed(0) mv:SetSideSpeed(0) mv:SetUpSpeed(0) mv:SetButtons(0) + removingbuttons["Quickturn.lua:186"] = SysTime() cmd:ClearMovement() diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua b/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua index d2a34eb..596dd65 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua @@ -31,6 +31,7 @@ local function SafetyRollThink(ply, mv, cmd) local ang = ply:GetSafetyRollAng() + removingbuttons["SafetyRoll.lua:34"] = SysTime() mv:SetSideSpeed(0) mv:SetForwardSpeed(0) diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/SwingPipe.lua b/beatrun/gamemodes/beatrun/gamemode/sh/SwingPipe.lua index 0faf361..6edddd3 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/SwingPipe.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/SwingPipe.lua @@ -80,6 +80,7 @@ local function SwingpipeThink(ply, mv, cmd) return end + removingbuttons["Swingpipe.lua:83"] = SysTime() mv:SetForwardSpeed(0) mv:SetSideSpeed(0) diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Swingbar.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Swingbar.lua index 814d10f..444bfc6 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Swingbar.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Swingbar.lua @@ -78,6 +78,7 @@ local function SwingbarThink(ply, mv, cmd) return end + removingbuttons["Swingbar.lua:81"] = SysTime() mv:SetForwardSpeed(0) mv:SetSideSpeed(0) diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Vaulting.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Vaulting.lua index 6bc0162..e8e5aef 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Vaulting.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Vaulting.lua @@ -577,6 +577,7 @@ hook.Add("SetupMove", "BeatrunVaulting", function(ply, mv, cmd) mv:SetSideSpeed(0) mv:SetUpSpeed(0) mv:SetForwardSpeed(0) + removingbuttons["Vaulting.lua:580"] = SysTime() cmd:ClearMovement() @@ -771,6 +772,7 @@ hook.Add("SetupMove", "BeatrunVaulting", function(ply, mv, cmd) end end else + removingbuttons["Vaulting.lua:774"] = SysTime() mv:SetButtons(0) end end diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Wallrun.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Wallrun.lua index a85036f..f5ebbcb 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Wallrun.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Wallrun.lua @@ -96,6 +96,7 @@ local function WallrunningThink(ply, mv, cmd) mv:SetVelocity(vel) mv:SetSideSpeed(0) mv:SetForwardSpeed(0) + removingbuttons["Wallrun.lua:99"] = SysTime() if ply:GetWallrunTime() < CurTime() or mv:GetVelocity():Length() < 10 then ply:SetWallrun(0) @@ -144,6 +145,7 @@ local function WallrunningThink(ply, mv, cmd) vecvel:Add(ply:GetWallrunDir():Angle():Forward() * -50) vecvel:Mul(ply:GetOverdriveMult()) + removingbuttons["Walltrun.lua:148"] = SysTime() mv:SetVelocity(vecvel) mv:SetForwardSpeed(0) mv:SetSideSpeed(0) @@ -185,6 +187,7 @@ local function WallrunningThink(ply, mv, cmd) if wr >= 2 and wrtimeremains then local dir = wr == 2 and 1 or -1 + removingbuttons["Walltrun.lua:190"] = SysTime() mv:SetForwardSpeed(0) mv:SetSideSpeed(0) diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/WallrunME.lua b/beatrun/gamemodes/beatrun/gamemode/sh/WallrunME.lua index c1d34e0..466fca6 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/WallrunME.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/WallrunME.lua @@ -186,6 +186,7 @@ function PuristWallrunningThink(ply, mv, cmd, wr, wrtimeremains) local vel = ang:Forward() * 30 vel.z = 25 + removingbuttons["WallrunME.lua:189"] = SysTime() mv:SetVelocity(vel) mv:SetSideSpeed(0) mv:SetForwardSpeed(0) @@ -237,6 +238,7 @@ function PuristWallrunningThink(ply, mv, cmd, wr, wrtimeremains) vecvel:Add(ply:GetWallrunDir():Angle():Forward() * -50) vecvel:Mul(ply:GetOverdriveMult()) + removingbuttons["WallrunME.lua:241"] = SysTime() mv:SetVelocity(vecvel) mv:SetForwardSpeed(0) mv:SetSideSpeed(0) @@ -278,6 +280,7 @@ function PuristWallrunningThink(ply, mv, cmd, wr, wrtimeremains) if wr >= 2 and wrtimeremains then local dir = wr == 2 and 1 or -1 + removingbuttons["WallrunME.lua:283"] = SysTime() mv:SetForwardSpeed(0) mv:SetSideSpeed(0) diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Zipline.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Zipline.lua index 73764cc..d36e954 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Zipline.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Zipline.lua @@ -211,6 +211,7 @@ local function ZiplineThink(ply, mv, cmd, zipline) ply:SetZiplineSpeed(math.Approach(speed, 750, FrameTime() * 250)) mv:SetVelocity(dir * speed) + removingbuttons["Zipline.lua:214"] = SysTime() mv:SetButtons(0) mv:SetForwardSpeed(0) mv:SetSideSpeed(0) diff --git a/beatrun/gamemodes/beatrun/gamemode/shared.lua b/beatrun/gamemodes/beatrun/gamemode/shared.lua index ef89693..e17176b 100644 --- a/beatrun/gamemodes/beatrun/gamemode/shared.lua +++ b/beatrun/gamemodes/beatrun/gamemode/shared.lua @@ -1,4 +1,4 @@ -VERSION_GLOBAL = "1.0.25" +VERSION_GLOBAL = "1.0.26" VERSION_LATEST = "" VERSION_CHECKED = false diff --git a/version.txt b/version.txt index 855f702..7717884 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.0.25 \ No newline at end of file +1.0.26 \ No newline at end of file