diff --git a/README.md b/README.md
index 9093c28..c2e181d 100644
--- a/README.md
+++ b/README.md
@@ -3,8 +3,6 @@ Modified beatrun's source code.
There are lua modules, they are for Discord Rich Presence to work, if you want pure Lua just don't extract them, but your Level and Map will not be shown in your Discord status.
This version of the beatrun works on any version of the game (Chromium or not).
-[Old Kick Glitch Version](https://github.com/JonnyBro/beatrun/tree/old-kickglitch)
-
# Installation
0. Delete `beatrun` folder in *addons* if you have it!
1. Extract `beatrun` folder to *your_game_folder/garrysmod/addons*.
@@ -14,6 +12,7 @@ This version of the beatrun works on any version of the game (Chromium or not).
## Changes added by me
* [Custom online courses database](https://courses.beatrun.ru)! It's free 🤯!
* Allow Overdrive usage on the server - `Beatrun_AllowOvedriveInMultiplayer`.
+* Toggle between old and new (like in ME) Kick-Glitch - `Beatrun_OldKickGlitch`.
* Change HUD's colors - `Beatrun_HUDTextColor`, `Beatrun_HUDCornerColor`, `Beatrun_HUDFloatingXPColor`.
* Discord Rich Presence (extract `lua` folder to `garrysmod`, along side with `addons` folder).
* Small camera punch when diving.
@@ -28,6 +27,7 @@ This version of the beatrun works on any version of the game (Chromium or not).
## Fixes and changes from previous version
* You can now dive to your death =)
+* Kick glitch version toggle.
# All changes and fixes
* Course saving works with compression and without.
diff --git a/beatrun/gamemodes/beatrun/gamemode/cl/off/ToolMenuSettings.lua b/beatrun/gamemodes/beatrun/gamemode/cl/ToolMenuSettings.lua
similarity index 100%
rename from beatrun/gamemodes/beatrun/gamemode/cl/off/ToolMenuSettings.lua
rename to beatrun/gamemodes/beatrun/gamemode/cl/ToolMenuSettings.lua
diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Melee.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Melee.lua
index f753562..ef7445a 100644
--- a/beatrun/gamemodes/beatrun/gamemode/sh/Melee.lua
+++ b/beatrun/gamemodes/beatrun/gamemode/sh/Melee.lua
@@ -1,4 +1,5 @@
-local kickglitch = CreateConVar("Beatrun_KickGlitch", 1, {FCVAR_REPLICATED, FCVAR_ARCHIVE})
+local kickglitch = CreateConVar("Beatrun_KickGlitch", "1", {FCVAR_REPLICATED, FCVAR_ARCHIVE})
+local old_kickglitch = CreateConVar("Beatrun_OldKickGlitch", "0", {FCVAR_REPLICATED, FCVAR_ARCHIVE})
local tr = {}
local tr_result = {}
@@ -270,8 +271,14 @@ hook.Add("SetupMove", "Melee", function(ply, mv, cmd)
return
end
- if ply:GetMeleeDelay() < CurTime() and ply:GetMelee() ~= 0 then
- if kickglitch:GetBool() and ply:GetMelee() >= 5 and not ply:OnGround() then
+ if ply:GetMeleeDelay() < CurTime() and ply:GetMelee() ~= 0 and ply:GetMelee() >= 5 and not ply:OnGround() then
+ if kickglitch:GetBool() and old_kickglitch:GetBool() and mv:KeyDown(IN_JUMP) then
+ local vel = mv:GetVelocity()
+ vel:Mul(1.25)
+ vel.z = 300
+
+ mv:SetVelocity(vel)
+ elseif kickglitch:GetBool() and not old_kickglitch:GetBool() then
if SERVER then
local platform = ents.Create("prop_physics")
local pos = ply:GetPos()
diff --git a/beatrun/gamemodes/beatrun/gamemode/sv/off/Menu_Gamemodes.lua b/beatrun/gamemodes/beatrun/gamemode/sv/Menu_Gamemodes.lua
similarity index 100%
rename from beatrun/gamemodes/beatrun/gamemode/sv/off/Menu_Gamemodes.lua
rename to beatrun/gamemodes/beatrun/gamemode/sv/Menu_Gamemodes.lua