mirror of
https://github.com/JonnyBro/beatrun.git
synced 2025-04-05 18:36:33 +05:00
Merge branch 'dev' into main
This commit is contained in:
commit
2f7cdbebc4
26 changed files with 313 additions and 133 deletions
149
README.md
149
README.md
|
@ -1,106 +1,104 @@
|
|||
# Beatrun | Community edition
|
||||
|
||||
[Click to join our Discord!](https://discord.gg/93Psubbgsg)
|
||||
* [Русский](./README_ru.md)\
|
||||
*(If you can read English: This isn't maintained, I don't speak Russian)*
|
||||
|
||||
* [Русский](./README.ru.md)
|
||||
**PLEASE READ EVERYTHING BEFORE ASKING QUESTIONS ON OUR SERVER!**
|
||||
|
||||
**PLEASE READ EVERYTHING BEFORE ASKING QUESTIONS ON OUR SERVER!**\
|
||||
**WE DOCUMENTED EVERYTHING ENOUGH SO YOU CAN INSTALL THIS YOURSELF PRETTY EASILY**
|
||||
|
||||
Infamous parkour addon for Garry's Mod.\
|
||||
Fully open sourced and maintained by the community (me 😞).
|
||||
Infamous parkour gamemode for Garry's Mod.\
|
||||
Fully open sourced and maintained by the community (like 4 people I think).
|
||||
|
||||
> [!IMPORTANT]
|
||||
> This repository doesn't contain any malicious modules. It does contain some modules for additional functionality like:
|
||||
> This repository does not contain any malicious modules whatsoever. These modules are present for more functionality however:
|
||||
>
|
||||
> * Discord Rich Presence.
|
||||
> * Steam Presence.
|
||||
> * Discord Rich Presence
|
||||
> * Steam Presence
|
||||
>
|
||||
> **They are optional and can be removed at any time.**\
|
||||
> You can find all modules **[here](https://github.com/JonnyBro/beatrun/tree/main/lua/bin)**.\
|
||||
> Check **[Credits](#credits)** section for their source code.
|
||||
> You can find all compiled modules **[here](lua/bin)** in the repository.\
|
||||
> Check **[Credits](#credits)** section for module source code.
|
||||
|
||||
## Steam Workshop (lmao)
|
||||
## Automatic Installation?
|
||||
|
||||
[Subscribe](https://steamcommunity.com/sharedfiles/filedetails/?id=3290421288)
|
||||
Not supported. I (LostTrackpad) am not going to set this up.[^2]
|
||||
|
||||
### Automatic Installation (Recommended | Windows 10/11)
|
||||
## Manual Installation
|
||||
|
||||
### *Method 1: Repository download and extract (easy)*
|
||||
|
||||
***Note**: `<Garry's Mod game folder>` is a placeholder for your Garry's Mod game folder.*
|
||||
|
||||
1. **[Download this repository](https://github.com/LostTrackpad/beatrun-forked/archive/refs/heads/dev.zip)**.
|
||||
2. **Delete the `beatrun` folder in *`<Garry's Mod game folder>/garrysmod/addons`* if you have one.**
|
||||
3. Extract the `beatrun-main/beatrun` folder to *`<Garry's Mod game folder>/garrysmod/addons`*.
|
||||
* If you want to have Discord and Steam Presence:
|
||||
* Extract the `beatrun-main/lua` folder to *`<Garry's Mod game folder>/garrysmod`*.
|
||||
4. That's it, Beatrun is installed.
|
||||
|
||||
### *Method 2: Using Git and Directory Junctions* ***(Windows 10+ Only!)***
|
||||
> [!WARNING]
|
||||
> Windows 7 is not supported.\
|
||||
> Update already...
|
||||
> This method requires:<br>
|
||||
> * **A working and up to date installation of Windows 10 or above.**
|
||||
> * A **working and usable** installation of Git for Windows on the system
|
||||
> * The drive volume you have Garry's Mod on ***must*** use a file system that supports Windows Directory Junctions (this will likely be NTFS)<br>
|
||||
|
||||
Run the command below in Powershell.
|
||||
> [!NOTE]
|
||||
> Win + R > `powershell` > *Enter*
|
||||
> [!IMPORTANT]
|
||||
> ***May*** work on Windows 7/8, but those versions of Windows are **no longer supported**! You really should upgrade if you're running either of those, and I will not provide support!
|
||||
|
||||
```powershell
|
||||
irm https://beatrun.jonnybro.ru/install | iex
|
||||
```
|
||||
If you're ready and willing to use this method, read [this](repocontent/WindowsGitInstallGuide.md) guide to continue.
|
||||
|
||||
* Select the `Beatrun` gamemode in right lower corner.
|
||||
|
||||
### Manual Installation
|
||||
|
||||
1. **[Download this repository](https://github.com/JonnyBro/beatrun/archive/refs/heads/master.zip)**.
|
||||
2. **Delete the `beatrun` folder in *your_game_folder/garrysmod/addons* if you have one.**
|
||||
3. Extract the `beatrun-main/beatrun` folder to *your_game_folder/garrysmod/addons*.
|
||||
4. If you want to have Discord and Steam Presence:
|
||||
* Extract the `beatrun-main/lua` folder to *your_game_folder/garrysmod*.
|
||||
5. Select the `Beatrun` gamemode in right lower corner.
|
||||
|
||||
## Animations
|
||||
|
||||
[Please refer to this file.](beatrun/README.md)
|
||||
|
||||
## Features
|
||||
## New Features
|
||||
|
||||
> [!IMPORTANT]
|
||||
> There are many undocumented changes and fixes in this version, you better look at the commits for more specific changes.
|
||||
> This version has *lots* of undocumented features and fixes. Look into the commit history if you wanna see all of them.
|
||||
|
||||
* Jonny_Bro is hosting **[custom courses database](https://courses.jonnybro.ru)**, which is also **free** to use and **[open sourced](https://git.jonnybro.ru/jonny_bro/beatrun-courses-server-express)**!
|
||||
* New gamemode - **Deathmatch** (it's way more fun than Data Theft I promise).
|
||||
* "Proper" Kick Glitch just like in **[original game](https://www.youtube.com/watch?v=zK5y3NBUStc)**.
|
||||
* In-game configuration menu - you can find it in the tools menu, in the **Beatrun** category.\
|
||||
**All** of the Beatrun settings can be changed in the configuration menu!
|
||||
* Discord and Steam Presence.
|
||||
* Jonny_Bro (original fork creator) is hosting **[a custom course database](https://courses.jonnybro.ru)**, which is ***free***[^1] to use and also **[open source](https://git.jonnybro.ru/jonny_bro/beatrun-courses-server-express)**!
|
||||
* New *Deathmatch* gamemode (it's definitely more fun than *Data Theft* trust us)
|
||||
* "Proper" kick glitch just like in **[original game](https://www.youtube.com/watch?v=zK5y3NBUStc)**
|
||||
* Kick glitch behavior type toggle (yep, original kick glitch is still usable!) - `Beatrun_OldKickGlitch` to toggle
|
||||
* In-game configuration menu - you can find it in the spawn menu, in the **`Beatrun`** category\
|
||||
***Most*** Beatrun settings can now be configured there! Use `cvarlist beatrun_` to list *all* Beatrun options (and some commands), including some I didn't list
|
||||
* Discord and Steam Presence *(only Discord presence is new actually)*
|
||||
* Localization support.\
|
||||
Available in 7 languages!
|
||||
* Build Mode Tweaks.\
|
||||
You can now spawn any prop from Spawn Menu and they will save in your course.
|
||||
* Ability to roll after ziplines with CTRL 🤯 (thanks c4nk <3).
|
||||
* Ability to get off of ladders - Press CTRL.
|
||||
* Ability to remove ziplines that created with *Zipline Gun* - Press RMB.
|
||||
* Arrow that shows the next checkpoint.
|
||||
* ConVar to allow Overdrive usage (server) - `Beatrun_AllowOverdriveInMultiplayer`.
|
||||
* ConVar to allow players to spawn props and weapons without admin rights (server) - `Beatrun_AllowPropSpawn`.
|
||||
* ConVar to toggle the heatlh regeneration (server) - `Beatrun_HealthRegen`.
|
||||
* ConVars to change HUD colors (client) - `Beatrun_HUDTextColor`, `Beatrun_HUDCornerColor`, `Beatrun_HUDFloatingXPColor`.
|
||||
* ConVar to toggle the grapple ability (client) - `Beatrun_DisableGrapple`.
|
||||
* ConVar to toggle between old and new Kick Glitch (client) - `Beatrun_OldKickGlitch`.
|
||||
Now in 7 languages *(mostly, some stuff is locked in English)*!
|
||||
* Dismounting from ladders with your duck key (default is `CTRL`)
|
||||
* Removing ziplines created with Zipline Gun using your alternate fire bind (default is `Right Mouse Button`)
|
||||
* Arrow that points to the next checkpoint
|
||||
* Serverside option to enable Overdrive mode in multiplayer: `Beatrun_AllowOverdriveInMultiplayer`
|
||||
* Serverside option to allow prop spawning without being an admin: `Beatrun_AllowPropSpawn`.
|
||||
* Serverside toggle for health regeneration: `Beatrun_HealthRegen`
|
||||
* You can change HUD colors (client only)! Use `Beatrun_HUDTextColor`, `Beatrun_HUDCornerColor`, and `Beatrun_HUDFloatingXPColor`
|
||||
* Clientside to allow disabling the grapple: `Beatrun_DisableGrapple`.
|
||||
* ConVar to allow QuickTurn with any weapon or only with *Runner Hands* (client) - `Beatrun_QuickturnHandsOnly`.
|
||||
* Small camera punch when diving.
|
||||
* Your SteamID on the screen is no longer present.
|
||||
* Your Steam account ID/*SteamID* is no longer shown on screen
|
||||
## Some Older (?) Fixes
|
||||
|
||||
## Fixes
|
||||
|
||||
* Some playermodels show up as **ERROR**.
|
||||
* Leaderboard sorting in gamemodes.
|
||||
* Grapple usage in courses and gamemodes.
|
||||
* Crash in Data Theft when touching Data Bank.
|
||||
* Collisions issues - PvP damage not going through in gamemodes other than Data Theft.
|
||||
* Allowed jumping while walking (🤷).
|
||||
* Tweaked safety roll - now you can roll under things.
|
||||
* Tweaked some grapple related stuff - now it moves with the entity it was attached to and other players can see the rope.
|
||||
* Some playermodels showing up as **`ERROR`**
|
||||
* Leaderboard sorting in gamemodes
|
||||
* Allow using the grapple in Time Trial and gamemodes
|
||||
* Crash in Data Theft when touching Data Bank
|
||||
* Collision issues - PvP damage not going through in gamemodes other than Data Theft
|
||||
* Allowed jumping while walking *(don't ask me, Jonny did this...)*.
|
||||
* Tweaked safety roll to allow rolling under stuff
|
||||
* Some grapple tweaks (moves with attached entity, other players can see rope)
|
||||
|
||||
## TODO
|
||||
|
||||
* [ ] Loadouts creation menu for Data Theft and Deathmatch. (idk how to properly implement this for know).
|
||||
* [ ] Loadouts creation menu for Data Theft and Deathmatch. (I don't do UI stuff, I can't do this).
|
||||
|
||||
## Known issues
|
||||
|
||||
* [Issues](https://github.com/JonnyBro/beatrun/issues).
|
||||
* Maybe more, i forgor 💀.
|
||||
* [Issues on Jonny's original fork](https://github.com/JonnyBro/beatrun/issues)\
|
||||
I'm not kidding, check there first for problems. ***Do not** report issues with this fork there.*
|
||||
|
||||
* [Issues on this fork](https://github.com/LostTrackpad/beatrun-forked/issues)\
|
||||
Report any issues with this fork here, and any feature requests you may want.
|
||||
|
||||
## Related projects
|
||||
|
||||
|
@ -108,9 +106,12 @@ You can now spawn any prop from Spawn Menu and they will save in your course.
|
|||
|
||||
## Credits
|
||||
|
||||
* [All contributors](https://github.com/JonnyBro/beatrun/graphs/contributors) - <3.
|
||||
* [EarthyKiller127](https://www.youtube.com/channel/UCiFqPwGo4x0J65xafIaECDQ) - He made that piece of shit.
|
||||
* [relaxtakenotes](https://github.com/relaxtakenotes) - Made all of this possible.
|
||||
* [MTB](https://www.youtube.com/@MTB396) - Beatrun Reanimated Project.
|
||||
* [Fluffy Servers](https://github.com/fluffy-servers/gmod-discord-rpc) - Discord Rich Presence.
|
||||
* [YuRaNnNzZZ](https://github.com/YuRaNnNzZZ/gmcl_steamrichpresencer) - Steam Presence.
|
||||
* [All contributors](https://github.com/JonnyBro/beatrun/graphs/contributors) for making Beatrun better
|
||||
* [EarthyKiller127](https://www.youtube.com/channel/UCiFqPwGo4x0J65xafIaECDQ) / datæ for making the original Beatrun gamemode *(and obfuscating it and putting it into DLL files...really?)*
|
||||
* [relaxtakenotes](https://github.com/relaxtakenotes) for even making all this possible
|
||||
* [MTB](https://www.youtube.com/@MTB396) for Beatrun Reanimated Project
|
||||
* [Fluffy Servers](https://github.com/fluffy-servers/gmod-discord-rpc) for Discord Rich Presence module
|
||||
* [YuRaNnNzZZ](https://github.com/YuRaNnNzZZ/gmcl_steamrichpresencer) for Steam Presence module
|
||||
|
||||
[^1]: *A Steam account with a copy of Garry's Mod is required. Ask them why if you're curious.*
|
||||
[^2]: *I already tried to set up a webserver on my PC. It failed. I don't want people spamming requests for the install script to my PC either, and I know Cloudflare is a thing. Maybe I'll try GitHub Pages?*
|
||||
|
|
BIN
beatrun/gamemodes/beatrun/content/models/meclimbanim.dx80.vtx
Normal file
BIN
beatrun/gamemodes/beatrun/content/models/meclimbanim.dx80.vtx
Normal file
Binary file not shown.
BIN
beatrun/gamemodes/beatrun/content/models/meclimbanim.dx90.vtx
Normal file
BIN
beatrun/gamemodes/beatrun/content/models/meclimbanim.dx90.vtx
Normal file
Binary file not shown.
BIN
beatrun/gamemodes/beatrun/content/models/meclimbanim.mdl
Normal file
BIN
beatrun/gamemodes/beatrun/content/models/meclimbanim.mdl
Normal file
Binary file not shown.
BIN
beatrun/gamemodes/beatrun/content/models/meclimbanim.sw.vtx
Normal file
BIN
beatrun/gamemodes/beatrun/content/models/meclimbanim.sw.vtx
Normal file
Binary file not shown.
BIN
beatrun/gamemodes/beatrun/content/models/meclimbanim.vvd
Normal file
BIN
beatrun/gamemodes/beatrun/content/models/meclimbanim.vvd
Normal file
Binary file not shown.
|
@ -221,14 +221,16 @@ function SWEP:Think()
|
|||
local eyeang = ply:EyeAngles()
|
||||
eyeang.x = 0
|
||||
|
||||
if insidestep and viewmodel:GetCycle() <= 0.1 and GetConVar("Beatrun_QuakeJump"):GetBool() then
|
||||
if SERVER then
|
||||
ply:EmitSound("quakejump.mp3", 100, 100, 0.2)
|
||||
if insidestep and GetConVar("Beatrun_QuakeJump"):GetBool() then
|
||||
if (!GetConVar("Beatrun_QuakeJump_Timing"):GetBool() and viewmodel:GetCycle() <= 0.1) or ply:GetNWBool("Beatrun_ExtraQuakeJumpTiming") then
|
||||
if SERVER then
|
||||
ply:EmitSound("quakejump.mp3", 100, 100, 0.2)
|
||||
end
|
||||
|
||||
ply.QuakeJumping = true
|
||||
|
||||
self:SetQuakeJumping(true)
|
||||
end
|
||||
|
||||
ply.QuakeJumping = true
|
||||
|
||||
self:SetQuakeJumping(true)
|
||||
end
|
||||
|
||||
if not ismoving and not ply:Crouching() then
|
||||
|
|
|
@ -15,6 +15,12 @@ local animtable = {
|
|||
usefullbody = 2
|
||||
}
|
||||
|
||||
changedanimset = false
|
||||
|
||||
if UseOldAnims:GetBool() then
|
||||
animtable.animmodelstring = "meclimbanim"
|
||||
end
|
||||
|
||||
fbanims = {
|
||||
ladderexittoplefthand = true,
|
||||
runfwdstart = true,
|
||||
|
@ -1342,9 +1348,43 @@ hook.Add("CalcViewModelView", "lol", function(wep, vm, oldpos, oldang, pos, ang)
|
|||
end)
|
||||
|
||||
local function JumpAnim(event, ply)
|
||||
if !animsetchange then animsetchange = false end
|
||||
if animsetchange != UseOldAnims:GetBool() then
|
||||
RemoveBodyAnim()
|
||||
end
|
||||
if animsetchange != UseOldAnims:GetBool() then
|
||||
if UseOldAnims:GetBool() then
|
||||
animtable.animmodelstring = "meclimbanim"
|
||||
else
|
||||
animtable.animmodelstring = "climbanim"
|
||||
end
|
||||
StartBodyAnim(animtable)
|
||||
|
||||
if not IsValid(BodyAnim) then return end
|
||||
|
||||
CreateBodyAnimArmCopy()
|
||||
|
||||
if not ply:ShouldDrawLocalPlayer() or CurTime() < 10 then
|
||||
for k, v in ipairs(playermodelbones) do
|
||||
local b = BodyAnim:LookupBone(v)
|
||||
|
||||
if b then
|
||||
BodyAnim:ManipulateBonePosition(b, Vector(0, 0, 100 * (k == 1 and -1 or 1)))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
hook.Add("BodyAnimCalcView", "JumpCalcView", JumpCalcView)
|
||||
hook.Add("BodyAnimDrawArm", "JumpArmThink", JumpArmThink)
|
||||
hook.Add("PostDrawOpaqueRenderables", "JumpArmDraw", JumpArmDraw)
|
||||
end
|
||||
if events[event] then
|
||||
local wasjumpanim = fbanims[BodyAnimString] and IsValid(BodyAnim)
|
||||
|
||||
if changedanimset then
|
||||
wasjumpanim = false
|
||||
end
|
||||
|
||||
if not wasjumpanim then
|
||||
RemoveBodyAnim()
|
||||
end
|
||||
|
@ -1374,6 +1414,11 @@ local function JumpAnim(event, ply)
|
|||
end
|
||||
|
||||
if not wasjumpanim then
|
||||
if UseOldAnims:GetBool() then
|
||||
animtable.animmodelstring = "meclimbanim"
|
||||
else
|
||||
animtable.animmodelstring = "climbanim"
|
||||
end
|
||||
StartBodyAnim(animtable)
|
||||
|
||||
if not IsValid(BodyAnim) then return end
|
||||
|
@ -1397,6 +1442,7 @@ local function JumpAnim(event, ply)
|
|||
BodyAnim:ResetSequence(BodyAnim:LookupSequence(BodyAnimString))
|
||||
end
|
||||
end
|
||||
animsetchange = UseOldAnims:GetBool()
|
||||
end
|
||||
|
||||
function CheckAnims()
|
||||
|
@ -1823,4 +1869,4 @@ local function JumpThink()
|
|||
end
|
||||
end
|
||||
|
||||
hook.Add("Think", "JumpThink", JumpThink)
|
||||
hook.Add("Think", "JumpThink", JumpThink)
|
|
@ -413,4 +413,26 @@ hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function()
|
|||
-- end
|
||||
-- panel:AddItem(LoadoutMenuButton)
|
||||
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: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)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
--include("preexecute/client.lua")
|
||||
include("shared.lua")
|
||||
|
||||
for _, v in ipairs(file.Find("gamemodes/beatrun/gamemode/cl/*.lua", "GAME")) do
|
||||
|
|
|
@ -6,6 +6,10 @@ for _, v in ipairs(file.Find("gamemodes/beatrun/gamemode/cl/*.lua", "GAME")) do
|
|||
AddCSLuaFile("cl/" .. v)
|
||||
end
|
||||
|
||||
if SERVER then
|
||||
include("preexecute/server.lua")
|
||||
end
|
||||
|
||||
for _, v in ipairs(file.Find("gamemodes/beatrun/gamemode/sh/*.lua", "GAME")) do
|
||||
AddCSLuaFile("sh/" .. v)
|
||||
include("sh/" .. v)
|
||||
|
|
|
@ -369,7 +369,16 @@ end
|
|||
|
||||
function PLAYER:CalcView(view)
|
||||
local mult = (self.Player:InOverdrive() and 1.1) or 1
|
||||
local fov = GetConVar("Beatrun_FOV"):GetInt()
|
||||
local fixfovmult = 1
|
||||
|
||||
if CLIENT then
|
||||
-- VERY hacky and dirty code and I apologize in advance
|
||||
local fov = GetConVar("fov_desired"):GetInt()
|
||||
|
||||
if IsValid(LocalPlayer():GetActiveWeapon()) then
|
||||
if lframeswepclass ~= LocalPlayer():GetActiveWeapon():GetClass() then
|
||||
-- SP clientside weapon swap detection
|
||||
FOVModifierBlock = true
|
||||
|
||||
view.fov = fov * mult
|
||||
|
||||
|
@ -531,8 +540,7 @@ end)
|
|||
hook.Add("PlayerSwitchWeapon", "BeatrunSwitchARC9FOVFix", function(ply)
|
||||
-- This ENTIRE hook is for dealing with ARC9's stupid FOV reset
|
||||
-- behavior after switching away from an ARC9 SWEP.
|
||||
ply:SetFOV(ply:GetInfoNum("Beatrun_FOV", 100))
|
||||
|
||||
ply:SetFOV(ply:GetInfoNum("Beatrun_FOV", 120))
|
||||
timer.Simple(0, function()
|
||||
ply:SetFOV(ply:GetInfoNum("Beatrun_FOV", 100))
|
||||
end)
|
||||
|
|
0
beatrun/gamemodes/beatrun/gamemode/preexecute/client.lua
Normal file
0
beatrun/gamemodes/beatrun/gamemode/preexecute/client.lua
Normal file
1
beatrun/gamemodes/beatrun/gamemode/preexecute/server.lua
Normal file
1
beatrun/gamemodes/beatrun/gamemode/preexecute/server.lua
Normal file
|
@ -0,0 +1 @@
|
|||
-- This file does nothing for now.
|
5
beatrun/gamemodes/beatrun/gamemode/preexecute/shared.lua
Normal file
5
beatrun/gamemodes/beatrun/gamemode/preexecute/shared.lua
Normal file
|
@ -0,0 +1,5 @@
|
|||
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)
|
||||
|
||||
UseOldAnims = CreateConVar("Beatrun_UseOldAnims", 0, {FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Use Mirror's Edge animations instead of the reanimated ones.", 0, 1)
|
|
@ -246,7 +246,7 @@ function CourseHUD()
|
|||
end
|
||||
|
||||
if GetConVar("Beatrun_ShowSpeedometer"):GetBool() then
|
||||
local speed = math.Round(ply:GetVelocity():Length() * 0.06858125)
|
||||
local speed = math.Round(ply:GetVelocity():Length2D() * 0.06858125)
|
||||
|
||||
if speed < 10 then
|
||||
speed = "0" .. speed
|
||||
|
|
|
@ -784,4 +784,10 @@ hook.Add("SetupMove", "Climbing", function(ply, mv, cmd)
|
|||
if ply:GetClimbing() ~= 0 then
|
||||
ClimbingThink(ply, mv, cmd)
|
||||
end
|
||||
end)
|
||||
|
||||
hook.Add("PlayerSwitchWeapon", "NoSwitchForClimbers", function(ply)
|
||||
if ply:GetClimbing() != 0 then
|
||||
return true
|
||||
end
|
||||
end)
|
|
@ -1,6 +1,8 @@
|
|||
local quakejump = CreateConVar("Beatrun_QuakeJump", 1, {FCVAR_REPLICATED, FCVAR_ARCHIVE})
|
||||
local sidestep = CreateConVar("Beatrun_SideStep", 1, {FCVAR_REPLICATED, FCVAR_ARCHIVE})
|
||||
local speed_limit = CreateConVar("Beatrun_SpeedLimit", 325, {FCVAR_REPLICATED, FCVAR_ARCHIVE})
|
||||
beatrunquakejumptiming = CreateConVar("Beatrun_QuakeJump_Timing", 0, {FCVAR_REPLICATED, FCVAR_ARCHIVE}, "Quakejump extra timing window in engine ticks (default 66).")
|
||||
-- This NEEDS to be accessible from runnerhands' code.
|
||||
|
||||
local function Hardland(jt)
|
||||
local ply = LocalPlayer()
|
||||
|
@ -309,6 +311,14 @@ hook.Add("SetupMove", "MESetupMove", function(ply, mv, cmd)
|
|||
activewep:SetSideStep(true)
|
||||
|
||||
mv:SetVelocity(cmd:GetViewAngles():Right() * -(speed_limit:GetInt() * 1.8))
|
||||
if beatrunquakejumptiming:GetInt() != 0 then
|
||||
ply:SetNWBool("Beatrun_ExtraQuakeJumpTiming", true)
|
||||
ply:SetFriction(ply:GetFriction() * 0.01)
|
||||
timer.Simple((engine.TickInterval() * beatrunquakejumptiming:GetInt()), function()
|
||||
ply:SetFriction(ply:GetFriction() / 0.01)
|
||||
ply:SetNWBool("Beatrun_ExtraQuakeJumpTiming", false)
|
||||
end)
|
||||
end
|
||||
|
||||
ply:ViewPunch(Angle(-3, 0, -4.5))
|
||||
|
||||
|
@ -324,6 +334,14 @@ hook.Add("SetupMove", "MESetupMove", function(ply, mv, cmd)
|
|||
activewep:SetSideStep(true)
|
||||
|
||||
mv:SetVelocity(cmd:GetViewAngles():Right() * (speed_limit:GetInt() * 1.8))
|
||||
if beatrunquakejumptiming:GetInt() != 0 then
|
||||
ply:SetNWBool("Beatrun_ExtraQuakeJumpTiming", true)
|
||||
ply:SetFriction(ply:GetFriction() * 0.01)
|
||||
timer.Simple((engine.TickInterval() * beatrunquakejumptiming:GetInt()), function()
|
||||
ply:SetFriction(ply:GetFriction() / 0.01)
|
||||
ply:SetNWBool("Beatrun_ExtraQuakeJumpTiming", false)
|
||||
end)
|
||||
end
|
||||
|
||||
ply:ViewPunch(Angle(-3, 0, 4.5))
|
||||
|
||||
|
@ -424,4 +442,15 @@ if CLIENT then
|
|||
ArmInterrupt("doorbash")
|
||||
LocalPlayer():CLViewPunch(Angle(1.5, -0.75, 0))
|
||||
end)
|
||||
end
|
||||
|
||||
if SERVER then
|
||||
concommand.Add(
|
||||
"Beatrun_ResetFriction",
|
||||
function()
|
||||
for _, ply in ipairs(player.GetAll()) do
|
||||
ply:SetFriction(1)
|
||||
end
|
||||
end
|
||||
)
|
||||
end
|
|
@ -280,6 +280,9 @@ hook.Add("SetupMove", "Melee", function(ply, mv, cmd)
|
|||
mv:SetVelocity(vel)
|
||||
elseif kickglitch:GetBool() and not old_kickglitch:GetBool() then
|
||||
if SERVER then
|
||||
local oldfriction = ply:GetFriction()
|
||||
ply:SetFriction(0)
|
||||
|
||||
local platform = ents.Create("prop_physics")
|
||||
|
||||
local pos = ply:GetPos()
|
||||
|
@ -294,7 +297,12 @@ hook.Add("SetupMove", "Melee", function(ply, mv, cmd)
|
|||
local phys = platform:GetPhysicsObject()
|
||||
phys:EnableMotion(false)
|
||||
|
||||
timer.Simple(0.3, function() SafeRemoveEntity(platform) end)
|
||||
ply:SetNWBool("KickglitchWindowActive", true)
|
||||
timer.Simple(0.3, function()
|
||||
ply:SetNWBool("KickglitchWindowActive", false)
|
||||
ply:SetFriction(oldfriction)
|
||||
SafeRemoveEntity(platform)
|
||||
end)
|
||||
end
|
||||
|
||||
ParkourEvent("jumpslow", ply)
|
||||
|
@ -313,4 +321,30 @@ hook.Add("SetupMove", "Melee", function(ply, mv, cmd)
|
|||
if ply:GetMeleeTime() ~= 0 then
|
||||
MeleeThink(ply, mv, cmd)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
hook.Add("Move", "KickglitchApply", function(ply,mv,cmd)
|
||||
if mv:KeyPressed(IN_JUMP) and ply:GetNWBool("KickglitchWindowActive", false) and !GetConVar("Beatrun_OldKickGlitch"):GetBool() then
|
||||
if !ply:Alive() then
|
||||
else
|
||||
local forward = ply:EyeAngles()
|
||||
forward.p = 0
|
||||
forward = forward:Forward()
|
||||
local speedboost = forward * (4 / 0.06858125)
|
||||
--print(speedboost)
|
||||
|
||||
--print("--")
|
||||
|
||||
--print(mv:GetVelocity())
|
||||
local vel = mv:GetVelocity()
|
||||
vel = vel + speedboost
|
||||
--print("--")
|
||||
--print(vel)
|
||||
vel.z = 300
|
||||
mv:SetVelocity(vel)
|
||||
end
|
||||
ply:SetNWBool("KickglitchWindowActive", false)
|
||||
end
|
||||
end)
|
||||
|
||||
hook.Remove("SetupMove", "ProperKickglitch")
|
|
@ -94,10 +94,10 @@ net.Receive("RollAnimSP", function()
|
|||
roll.BodyAnimSpeed = 1.15
|
||||
end
|
||||
|
||||
if GetConVar("Beatrun_OldAnims"):GetBool() then
|
||||
roll.animmodelstring = "old_climbanim"
|
||||
if UseOldAnims:GetBool() then
|
||||
roll.animmodelstring = "meclimbanim"
|
||||
else
|
||||
roll.animmodelstring = "new_climbanim"
|
||||
roll.animmodelstring = "climbanim"
|
||||
end
|
||||
|
||||
CacheBodyAnim()
|
||||
|
@ -138,10 +138,10 @@ hook.Add("SetupMove", "EvadeRoll", function(ply, mv, cmd)
|
|||
end
|
||||
|
||||
if CLIENT and IsFirstTimePredicted() then
|
||||
if GetConVar("Beatrun_OldAnims"):GetBool() then
|
||||
roll.animmodelstring = "old_climbanim"
|
||||
if UseOldAnims:GetBool() then
|
||||
roll.animmodelstring = "meclimbanim"
|
||||
else
|
||||
roll.animmodelstring = "new_climbanim"
|
||||
roll.animmodelstring = "climbanim"
|
||||
end
|
||||
|
||||
CacheBodyAnim()
|
||||
|
@ -214,12 +214,11 @@ hook.Add("OnPlayerHitGround", "SafetyRoll", function(ply, water, floater, speed)
|
|||
end
|
||||
|
||||
if CLIENT and IsFirstTimePredicted() then
|
||||
if GetConVar("Beatrun_OldAnims"):GetBool() then
|
||||
roll.animmodelstring = "old_climbanim"
|
||||
if UseOldAnims:GetBool() then
|
||||
roll.animmodelstring = "meclimbanim"
|
||||
else
|
||||
roll.animmodelstring = "new_climbanim"
|
||||
roll.animmodelstring = "climbanim"
|
||||
end
|
||||
|
||||
CacheBodyAnim()
|
||||
RemoveBodyAnim()
|
||||
StartBodyAnim(roll)
|
||||
|
|
|
@ -20,39 +20,42 @@ 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 math.abs(dot) < 0.7 then return 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)
|
||||
|
||||
ParkourEvent("swingbar", ply)
|
||||
|
||||
mv:SetVelocity(vector_origin)
|
||||
|
||||
if mv:KeyDown(IN_FORWARD) or mv:GetVelocity():Length() > 150 then
|
||||
ply:SetSBOffsetSpeed(2)
|
||||
if CrueltyParkour:GetBool() and !ply:UsingRH() then
|
||||
else
|
||||
ply:SetSBOffsetSpeed(0)
|
||||
end
|
||||
local swingbar = trout.Entity
|
||||
local dot = cmd:GetViewAngles():Forward():Dot(swingbar:GetAngles():Forward())
|
||||
local dir = dot > 0 and true or false
|
||||
|
||||
if CLIENT and IsFirstTimePredicted() or game.SinglePlayer() then
|
||||
ply:EmitSound("Handsteps.ConcreteHard")
|
||||
if math.abs(dot) < 0.7 then return 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)
|
||||
|
||||
ParkourEvent("swingbar", ply)
|
||||
|
||||
mv:SetVelocity(vector_origin)
|
||||
|
||||
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")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -137,7 +140,8 @@ 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)
|
||||
|
||||
if mv:KeyPressed(IN_JUMP) and offset > 90 then
|
||||
|
|
|
@ -774,4 +774,12 @@ hook.Add("SetupMove", "BeatrunVaulting", function(ply, mv, cmd)
|
|||
mv:SetButtons(0)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
hook.Add("PlayerSwitchWeapon", "NoWeaponWhileMantling", function(ply)
|
||||
if ply:GetMantle() == 5 then
|
||||
-- You are still mantling at this state, don't pull an SMG
|
||||
-- out of your back pocket
|
||||
return true
|
||||
end
|
||||
end)
|
|
@ -78,6 +78,10 @@ local function WallrunningThink(ply, mv, cmd)
|
|||
mv:SetButtons(mv:GetButtons() - IN_DUCK)
|
||||
end
|
||||
|
||||
if math.Round(math.Rand(0, 1.1), 1) > 1 and SlippyWallrun:GetBool() and !ply:UsingRH() then
|
||||
timer.Simple(math.Rand(0, (ply:GetWallrunTime() - CurTime())), function() ply:SetWallrunTime(0) end)
|
||||
end
|
||||
|
||||
local wrtimeremains = CurTime() < ply:GetWallrunTime()
|
||||
|
||||
if PuristWallrun:GetBool() then
|
||||
|
@ -522,12 +526,15 @@ end
|
|||
local vecdir = Vector(1000, 1000, 1000)
|
||||
|
||||
hook.Add("SetupMove", "Wallrunning", function(ply, mv, cmd)
|
||||
if ply:GetWallrun() == nil or not ply:Alive() then
|
||||
if ply:GetWallrun() == nil or not ply:Alive() or (CrueltyParkour:GetBool() and !ply:UsingRH() and !SlippyWallrun:GetBool()) then
|
||||
ply:SetWallrun(0)
|
||||
end
|
||||
|
||||
if ply:GetWallrun() == 0 and mv:GetVelocity().z > -450 and not ply:OnGround() and mv:KeyDown(IN_FORWARD) and not ply:Crouching() and not mv:KeyDown(IN_DUCK) and ply:GetMoveType() ~= MOVETYPE_NOCLIP and ply:WaterLevel() < 1 then
|
||||
WallrunningCheck(ply, mv, cmd)
|
||||
if (CrueltyParkour:GetBool() and !ply:UsingRH() and !SlippyWallrun:GetBool()) then
|
||||
else
|
||||
WallrunningCheck(ply, mv, cmd)
|
||||
end
|
||||
end
|
||||
|
||||
if ply:GetWallrun() ~= 0 then
|
||||
|
|
|
@ -138,7 +138,7 @@ local function ZiplineThink(ply, mv, cmd, zipline)
|
|||
dir:Mul(-1)
|
||||
end
|
||||
|
||||
if fraction >= 1 or cmd:KeyDown(IN_DUCK) then
|
||||
if fraction >= 1 or cmd:KeyDown(IN_DUCK) or (CrueltyParkour:GetBool() and !ply:UsingRH()) then
|
||||
ply:SetZipline(nil)
|
||||
ply:SetMoveType(MOVETYPE_WALK)
|
||||
|
||||
|
|
|
@ -9,6 +9,8 @@ GM.Website = "www.mirrorsedge.com xd"
|
|||
|
||||
include("player_class/player_beatrun.lua")
|
||||
|
||||
include("preexecute/shared.lua")
|
||||
|
||||
for _, v in ipairs(file.Find("gamemodes/beatrun/gamemode/sh/*.lua", "GAME", "nameasc")) do
|
||||
AddCSLuaFile("sh/" .. v)
|
||||
include("sh/" .. v)
|
||||
|
|
1
repocontent/WindowsGitInstallGuide.md
Normal file
1
repocontent/WindowsGitInstallGuide.md
Normal file
|
@ -0,0 +1 @@
|
|||
This guide is currently a work in progress. Check back later. Use [Method 1](../README.md#method-1-repository-download-and-extract-easy) for now.
|
Loading…
Add table
Reference in a new issue