Compare commits

...

92 commits

Author SHA1 Message Date
LostTrackpad
415c307011 Merge branch 'JonnyBro-main' into upstream 2024-12-19 14:46:32 +07:00
LostTrackpad
23368f7c17 Merge branch 'main' of https://github.com/JonnyBro/beatrun into JonnyBro-main 2024-12-19 14:45:17 +07:00
Jonny_Bro (Nikita)
2b41282ffe update incompatible addons 2024-12-18 22:31:44 +05:00
Jonny_Bro (Nikita)
89383faa3a update anims 2024-12-14 12:23:39 +05:00
b59c0f6ca2 update link to the database sources 2024-12-06 23:46:51 +05:00
d718ef226a fix some warnings 2024-11-30 21:23:34 +05:00
6472e0af42 rewrite READMEs again (yipee) 2024-11-30 21:21:50 +05:00
4467097586
v1.0.22
fix courses on maps with spaces in the name not loading (i hate edge runner)
2024-11-23 16:10:16 +05:00
48422f0262
add checkbox for arc9 loadouts 2024-11-10 19:31:07 +05:00
f794f7e10b
v1.0.21 2024-11-10 17:00:46 +05:00
669c266cfd
Hopefully fix roll-to-slide bug dff602a651 2024-11-10 16:59:25 +05:00
45c2c77bc3
proper arc9 random weapons 2024-11-08 21:57:50 +05:00
d7d9a16250
testing random arc9 weapons 2024-11-08 21:35:11 +05:00
148352596f
update anims, inflict huge damage to insure player's death 2024-11-07 17:03:50 +05:00
7fc975dc42
v1.0.17 2024-11-04 19:06:33 +05:00
83e2d53d9f
fix anticamp box working only in infection 2024-11-04 19:05:50 +05:00
7043cd002a
update anims :O 2024-11-01 20:26:32 +05:00
c60ef6eed7
v1.0.16 2024-10-09 21:01:02 +05:00
2d190d3d5b
add vmanip and some vmanip based addons to non compatible list 2024-10-09 21:00:35 +05:00
ea2c5f58ca
v1.0.15 2024-10-04 18:17:35 +05:00
e5c25f310e
clean up previous commit 2024-10-04 18:17:02 +05:00
LostTrackpad
bd4a147c1b
Hotfix for keystrokes glitching with key unbound (#217) 2024-10-04 18:05:52 +05:00
Jonny_Bro (Nikita)
ec38d2d230
Merge pull request #216 from Patrxgt/main
Update Polish translation
2024-10-03 17:43:29 +05:00
Patrxgt
20a26ec5e1
Update Polish translation 2024-10-03 13:53:14 +02:00
f890b7ba07
update LICENSE 🤯 2024-10-03 13:26:41 +05:00
LostTrackpad
775924d899 Merge branch 'JonnyBro-main' of https://github.com/losttrackpad/beatrun-forked into JonnyBro-main 2024-08-17 17:07:56 +07:00
LostTrackpad
c52fec811a Don't spam the console with replay data 2024-08-07 22:52:39 +07:00
LostTrackpad
3d542ec507 Some other enhancements? 2024-08-07 22:51:14 +07:00
LostTrackpad
2d9eef6d8a Fix in-course timer (how did this not get committed) 2024-08-07 19:55:39 +07:00
LostTrackpad
fd07e344d8 Reorder some code to prevent extra print calls 2024-08-07 19:54:34 +07:00
LostTrackpad
8c18caab1d Forgot something
A final touch to the replay system.
2024-08-07 18:56:06 +07:00
LostTrackpad
5bd6db9005 Make replay system better 2024-08-07 18:55:32 +07:00
LostTrackpad
8c80753403 Fix lastinv command for runnerhands 2024-08-07 16:45:29 +07:00
LostTrackpad
f983223cba Yet another part of the replay that I forgor 2024-08-07 16:45:11 +07:00
LostTrackpad
b2b8954d12 Fix goofy low health overlay stuff 2024-08-07 16:44:55 +07:00
LostTrackpad
4da9bae84e Change some DoF parameters 2024-08-07 16:44:34 +07:00
LostTrackpad
7143604d8d Ladder jumping and also some trolling 2024-08-07 16:39:13 +07:00
LostTrackpad
d8acbaa10d Fancy ass bokeh DoF (optional, of course) 2024-08-07 16:38:10 +07:00
LostTrackpad
65a94f54e5 Also fix anims in slowmo 2024-08-07 16:37:49 +07:00
LostTrackpad
1c1e58ac98 Allow replay system to actually work (idiot move) 2024-08-07 16:37:07 +07:00
LostTrackpad
a7dd8b9624 Re-enable replay system (WIP) 2024-08-07 16:36:27 +07:00
LostTrackpad
900de4c9f4 Make low health overlay not draw over HUDs 2024-07-29 22:28:04 +07:00
LostTrackpad
ba49b787c9 Remove silly print() 2024-07-29 22:27:35 +07:00
LostTrackpad
b40e360321 Disable noclip desaturation 2024-07-29 22:25:50 +07:00
LostTrackpad
76ad18e1aa Fix some spawnmenu settings for my repo 2024-07-19 15:11:50 +07:00
LostTrackpad
7efc6edc00 Proof-of-concept "momentum shield" 2024-07-18 21:34:43 +07:00
LostTrackpad
7122778304 Merge branch 'main' of https://github.com/JonnyBro/beatrun into dev 2024-07-17 16:00:57 +07:00
LostTrackpad
ce011380c0 Remove prints to console 2024-07-17 15:13:52 +07:00
LostTrackpad
3e6e68b29a Something went wrong here 2024-07-17 15:02:35 +07:00
LostTrackpad
57a9e4c57b Unscrew the JumpAnim.lua file 2024-07-17 09:03:41 +07:00
LostTrackpad
edcb849324
Merge pull request #6 from LostTrackpad/main
Merge to dev branch
2024-07-17 09:01:12 +07:00
LostTrackpad
2f7cdbebc4
Merge branch 'dev' into main 2024-07-17 09:01:04 +07:00
LostTrackpad
7ea74e78a8 screw you VS Code conflict detection... 2024-07-17 08:56:33 +07:00
LostTrackpad
0958795c75 Merge branch 'JonnyBro-main' 2024-07-17 08:56:00 +07:00
LostTrackpad
dfb7cc2437 Merge branch 'main' of https://github.com/JonnyBro/beatrun into JonnyBro-main 2024-07-17 08:55:30 +07:00
LostTrackpad
50bf65f447 Nuke redundant anim files and C# anim installer 2024-07-17 08:37:29 +07:00
LostTrackpad
31d332bfb3 Remove unnecessary prints to console 2024-07-16 19:38:58 +07:00
LostTrackpad
bd0201f70b Merge branch 'dev' of https://github.com/losttrackpad/beatrun-forked into dev 2024-07-16 19:34:22 +07:00
LostTrackpad
fb620979c1 Add on-the-fly animation swapping support 2024-07-16 19:34:10 +07:00
LostTrackpad
add32240a8 Add on-the-fly animation swapping support 2024-07-16 19:29:19 +07:00
LostTrackpad
6e24708ecd Fix FOV...hopefully finally 2024-06-23 22:38:50 +07:00
LostTrackpad
513598b36e Unfrick FOV...please be the final time 2024-06-23 22:37:56 +07:00
LostTrackpad
5ef56f4d70 Rework kickglitch again to reduce insane code 2024-06-18 21:10:18 +07:00
LostTrackpad
7df82b0bed Remove some unneeded shit 2024-06-18 21:03:57 +07:00
LostTrackpad
8c6664036c Horizontal-only speedometer because f you 2024-06-18 20:57:12 +07:00
LostTrackpad
222fe216ff Properly rework kickglitch for fucking real 2024-06-18 20:56:35 +07:00
LostTrackpad
f61e6e344d Remove some useless code 2024-06-18 16:04:39 +07:00
LostTrackpad
a25f5a6ee7 Fix cruel wallrun 2024-06-18 16:04:13 +07:00
LostTrackpad
32863eb53a Fix my dumb arse bug 2024-06-18 15:38:53 +07:00
LostTrackpad
44842541be Push leg fix (closes #4) 2024-06-18 15:36:20 +07:00
LostTrackpad
234bd45a87 Add spawnmenu setting 2024-06-17 16:56:36 +07:00
LostTrackpad
de0a2b16bd
Fix repo download 2024-06-16 16:25:25 +07:00
LostTrackpad
284b4f8698 Merge branch 'dev' of https://github.com/LostTrackpad/beatrun-forked into dev 2024-06-16 16:15:44 +07:00
LostTrackpad
8efccbb78c Update README 2024-06-16 16:15:24 +07:00
LostTrackpad
2a9e7a01bd Work-in-progress Cruelty Parkour™ 2024-06-16 16:10:50 +07:00
LostTrackpad
771677caa4
Update README.md 2024-06-15 21:34:34 +07:00
LostTrackpad
865b2b9e28 Fix the footnote (thanks GitHub!) 2024-06-15 17:56:06 +07:00
LostTrackpad
a1e250d73d Update README and some other stuff 2024-06-15 17:45:43 +07:00
LostTrackpad
d5bf1b62e2 Merge branch 'dev' of https://github.com/LostTrackpad/beatrun-forked into dev 2024-06-15 16:57:00 +07:00
LostTrackpad
9be0ee2c6b Add extended long jump timing (optional) 2024-06-15 16:56:40 +07:00
LostTrackpad
074d5d717b
Merge pull request #2 from LostTrackpad/main
merge changes
2024-06-12 17:57:36 +07:00
LostTrackpad
a12c76f09c Merge branch 'main' of https://github.com/LostTrackpad/beatrun-forked 2024-06-12 17:56:18 +07:00
LostTrackpad
c1eae1cb94 Merge branch 'JonnyBro-main' 2024-06-12 17:55:17 +07:00
LostTrackpad
098d9713be Merge branch 'main' of https://github.com/JonnyBro/beatrun into JonnyBro-main 2024-06-12 17:54:36 +07:00
LostTrackpad
ccb93a2fc5
Remove comments 2024-06-07 19:52:24 +07:00
LostTrackpad
3907207dc9 Hopefully fix FOV changing 2024-06-06 19:09:37 +07:00
LostTrackpad
cfdf6fedac Fix invalid (S)WEP causing issues 2024-06-06 13:34:34 +07:00
LostTrackpad
5723dbed10 Remove some unused stuff 2024-06-06 13:29:07 +07:00
LostTrackpad
5a3edb21f8 Properly squash FOV bugs 2024-06-06 13:26:48 +07:00
LostTrackpad
f626a1d1a7 Further polish up the FOV fix 2024-06-06 12:46:16 +07:00
LostTrackpad
fdb3d703bf Hacky fix for FOV behavior. For real (I think). 2024-06-06 00:11:31 +07:00
LostTrackpad
0904f2d072 Fix in-course timer HUD
It's just some SetFont() calls come on.
2024-06-05 21:06:02 +07:00
53 changed files with 934 additions and 466 deletions

29
LICENSE
View file

@ -1,24 +1,13 @@
This is free and unencumbered software released into the public domain. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Anyone is free to copy, modify, publish, use, compile, sell, or Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors Everyone is permitted to copy and distribute verbatim or modified
of this software dedicate any and all copyright interest in the copies of this license document, and changing it is allowed as long
software to the public domain. We make this dedication for the benefit as the name is changed.
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <https://unlicense.org> 0. You just DO WHAT THE FUCK YOU WANT TO.

175
README.md
View file

@ -1,110 +1,125 @@
# Beatrun | Community edition # Beatrun | Community Edition
[![forthebadge](https://forthebadge.com/images/featured/featured-powered-by-electricity.svg)](https://forthebadge.com) [![Powered by Electricity](https://forthebadge.com/images/featured/featured-powered-by-electricity.svg)](https://forthebadge.com)
[![forthebadge](https://forthebadge.com/images/badges/powered-by-black-magic.svg)](https://forthebadge.com) [![Powered by Black Magic](https://forthebadge.com/images/badges/powered-by-black-magic.svg)](https://forthebadge.com)
[Click to join our Discord!](https://discord.gg/93Psubbgsg) [**Join our Discord Community!**](https://discord.gg/93Psubbgsg)
* [Русский](./README.ru.md) > *[Русский | Russian](./README.ru.md)*
**PLEASE READ EVERYTHING BEFORE ASKING QUESTIONS!** ---
Infamous parkour addon for Garry's Mod. Fully open sourced and maintained by the community (me 😞). ## 🚨 Important Notice
> [!IMPORTANT] ### Please read this README thoroughly before asking questions
> This repository doesn't contain any malicious modules. However, we have some modules for additional functionality:
>
> * Discord Rich Presence.
> * Steam Presence.
>
> **They are completely 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.
## Automatic Installation (Recommended | Windows 10/11) ### The **only official source** for this fork is this GitHub repository. Workshop versions are outdated and unsupported
---
## About
Beatrun is an **infamous parkour addon for Garry's Mod**, now fully open-sourced and maintained by the community.
It includes various improvements, new features, and enhanced functionality.
> [!WARNING] > [!WARNING]
> Windows 7 and old versions of Windows 10 are not supported.\ > **This repository contains no malicious modules.** However, optional modules such as Discord Rich Presence and Steam Presence are available for additional features.
> Please update. > These are **completely optional** and can be removed at any time.
>
> - Modules are located **[here](https://github.com/JonnyBro/beatrun/tree/main/lua/bin)**.
> - Refer to the **[Credits](#credits)** section for their source code.
---
## Installation
### 🔧 Automatic Installation (Recommended for Windows 10/11)
Run the command below in Powershell (run as admin if your Steam or game located in a C: drive).
> [!NOTE] > [!NOTE]
> Win + R > `powershell` > *Enter* > Windows 7 and old versions of Windows 10 are not supported. Please update your OS.
Run the following command in PowerShell (Run as Administrator if Steam and/or the game is installed on the system (C:) drive):
```powershell ```powershell
irm https://beatrun.jonnybro.ru/install | iex irm https://beatrun.jonnybro.ru/install | iex
``` ```
* Start the game.
* Select the `Beatrun` gamemode in right lower corner.
## Manual Installation
1. **[Download this repository](https://github.com/JonnyBro/beatrun/archive/refs/heads/master.zip)**.
1. **Delete the `beatrun` folder in *your_game_folder/garrysmod/addons* if you have one.**
1. Extract the `beatrun-main/beatrun` folder to *your_game_folder/garrysmod/addons*.
1. If you want to have Discord and Steam Presence:
* Extract the `beatrun-main/lua` folder to *your_game_folder/garrysmod*.
1. Start the game. 1. Start the game.
1. Select the `Beatrun` gamemode in right lower corner. 2. Select the `Beatrun` gamemode in the bottom-right 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 it exists.
3. Extract `beatrun-main/beatrun` into `your_game_folder/garrysmod/addons`.
4. (Optional) For Discord and Steam Presence, extract `beatrun-main/lua` to `your_game_folder/garrysmod`.
5. Start the game.
6. Select the `Beatrun` gamemode in the bottom-right corner.
---
## Features and Updates
### New Features
- **Custom Courses Database** hosted by Jonny_Bro: **[Access Here](https://courses.jonnybro.ru)** (free and **[open source](https://git.jonnybro.ru/jonny_bro/beatrun-courses-server)**).
- **New Gamemode:** Deathmatch.
- "Proper" Kick Glitch similar to the **[original game](https://www.youtube.com/watch?v=zK5y3NBUStc)**.
- In-game configuration menu in the Tools menu under **Beatrun**. All settings can be modified here.
- Localization support in **7 languages**.
- Enhanced Build Mode: spawn props from the Spawn Menu, and they will save in your course.
- Various new abilities:
- **Roll after ziplines:** Press `+duck` (CTRL by default).
- **Dismount ladders:** Press `+duck` (CTRL by default).
- **Remove ziplines created with Zipline Gun:** Press `+attack2` (RMB by default).
- **Next checkpoint arrow** for easier navigation.
- New server and client configuration variables:
- Server:
- `Beatrun_AllowOverdriveInMultiplayer`: Allows Overdrive in multiplayer.
- `Beatrun_AllowPropSpawn`: Lets players spawn props and weapons without admin rights.
- `Beatrun_HealthRegen`: Toggles health regeneration.
- Client:
- `Beatrun_HUDTextColor`, `Beatrun_HUDCornerColor`, `Beatrun_HUDFloatingXPColor`: Customize HUD colors.
- `Beatrun_DisableGrapple`: Toggle the grapple ability.
- `Beatrun_OldKickGlitch`: Switch between old and new Kick Glitch.
- `Beatrun_QuickturnHandsOnly`: Restrict QuickTurn to the Runner Hands weapon.
- Other improvements:
- Small camera punch effect when diving.
- SteamID no longer displayed on screen.
### Fixes
- Fixed playermodels showing as `ERROR` in first person.
- Improved leaderboard sorting in gamemodes.
- Fixed crashes and issues with Data Theft gamemode.
- Enabled jumping while walking.
- Grapples now follow moving entities and are visible to other players.
---
## Animations ## Animations
Animations installer was removed, now you can switch between animations in Tools menu in Beatrun category. The animations installer has been removed. You can now switch animations directly in the **Tools menu** under the Beatrun category.
## What's new ---
> [!IMPORTANT] ## Known Issues
> There are many undocumented changes and fixes in this version, you better look at the commits for more specific changes.
* 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-docker)**! - See the full list of issues **[here](https://github.com/JonnyBro/beatrun/issues)**.
* 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.
* 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.
* Server ConVar to allow Overdrive usage in multiplayer - `Beatrun_AllowOverdriveInMultiplayer`.
* Server ConVar to allow players to spawn props and weapons without admin rights - `Beatrun_AllowPropSpawn`.
* Server ConVar to toggle the health regeneration - `Beatrun_HealthRegen`.
* Client ConVars to change HUD colors - `Beatrun_HUDTextColor`, `Beatrun_HUDCornerColor`, `Beatrun_HUDFloatingXPColor`.
* Client ConVar to toggle the grapple ability - `Beatrun_DisableGrapple`.
* Client ConVar to toggle between old and new Kick Glitch - `Beatrun_OldKickGlitch`.
* Client ConVar to allow QuickTurn with any weapon or only with *Runner Hands* - `Beatrun_QuickturnHandsOnly`.
* Small camera punch when diving.
* SteamID is no longer shown on screen.
## Fixes ---
* Some playermodels show up as ERROR in first person. ## Related Projects
* Leaderboard sorting in gamemodes.
* Grapple usage in courses and gamemodes.
* Crash in Data Theft when touching Data Bank.
* PvP damage not going through in gamemodes other than Data Theft.
* Allowed jumping while walking.
* You can now roll under things using safety roll.
* Now grapple moves with the entity it was attached to and other players can see the rope.
## Known issues - **[Beatrun Reanimated Project](https://github.com/JonnyBro/beatrun-anims)**
* [Issues](https://github.com/JonnyBro/beatrun/issues). ---
## Related projects
* [Beatrun Reanimated Project](https://github.com/JonnyBro/beatrun-anims).
## Credits ## Credits
* [All contributors](https://github.com/JonnyBro/beatrun/graphs/contributors) - <3. - **[All contributors](https://github.com/JonnyBro/beatrun/graphs/contributors)** ❤️
* [EarthyKiller127/datae](https://www.youtube.com/channel/UCiFqPwGo4x0J65xafIaECDQ) - Original creator of Beatrun. - [EarthyKiller127/datae](https://www.youtube.com/channel/UCiFqPwGo4x0J65xafIaECDQ) - Original creator of Beatrun.
* [relaxtakenotes](https://github.com/relaxtakenotes) - Made all of this possible. - [relaxtakenotes](https://github.com/relaxtakenotes) - Made this project possible.
* [MTB](https://www.youtube.com/@MTB396) - Beatrun Reanimated Project. - [MTB](https://www.youtube.com/@MTB396) - Beatrun Reanimated Project.
* [Fluffy Servers](https://github.com/fluffy-servers/gmod-discord-rpc) - Discord Rich Presence. - [Fluffy Servers](https://github.com/fluffy-servers/gmod-discord-rpc) - Discord Rich Presence.
* [YuRaNnNzZZ](https://github.com/YuRaNnNzZZ/gmcl_steamrichpresencer) - Steam Presence (TFA Base creator!). - [YuRaNnNzZZ](https://github.com/YuRaNnNzZZ/gmcl_steamrichpresencer) - Steam Presence (TFA Base creator).

View file

@ -1,110 +1,127 @@
# Beatrun | Community edition # Beatrun | Community Edition
[![forthebadge](https://forthebadge.com/images/featured/featured-powered-by-electricity.svg)](https://forthebadge.com) [![Powered by Electricity](https://forthebadge.com/images/featured/featured-powered-by-electricity.svg)](https://forthebadge.com)
[![forthebadge](https://forthebadge.com/images/badges/powered-by-black-magic.svg)](https://forthebadge.com) [![Powered by Black Magic](https://forthebadge.com/images/badges/powered-by-black-magic.svg)](https://forthebadge.com)
[Нажмите чтобы присоедениться к нашему Discord серверу!](https://discord.gg/93Psubbgsg) [**Присоединяйтесь к нашему сообществу в Discord!**](https://discord.gg/93Psubbgsg)
* [English](./README.md) > *[English | Английский](./README.md)*
**ПОЖАЛУЙСТА, ПРОЧИТАЙТЕ ВЕСЬ ДОКУМЕНТ ПЕРЕД ТЕМ КАК ЗАДАВАТЬ ВОПРОСЫ!** ---
Печально известный паркур аддон для Garry's Mod. Теперь, с полностью открытым исходным кодом и поддерживаемый сообществом (мной 😞). ## 🚨 Важное уведомление
> [!IMPORTANT] ### Пожалуйста, прочитайте этот README полностью перед тем, как задавать вопросы
> Данный репозиторий не содержит вредоносных модулей. Однако, мы имеем несколько модулей для дополнительного функционала:
>
> * Модуль для показа статуса в Discord.
> * Модуль для показа статуса в Steam.
>
> **Они не обязательны и могут быть удалены в любой момент.**\
> Список всех модуйлей находится **[здесь](https://github.com/JonnyBro/beatrun/tree/main/lua/bin)**.\
> Проверьте **[Благодарности](#благодарности)** чтобы найти их исходный код.
## Автоматическая установка (Рекомендуется | Windows 10/11) ### **Единственный официальный источник** этого форка — этот репозиторий на GitHub. Версии в Workshop устарели и не поддерживаются
---
## О проекте
Beatrun — это **знаменитый паркур-аддон для Garry's Mod**, теперь с полностью открытым исходным кодом и поддерживаемый сообществом.
Включает различные улучшения, новые функции и расширенную функциональность.
> [!WARNING] > [!WARNING]
> Windows 7 и старые сборки Windows 10 не поддерживаются. > **В этом репозитории нет вредоносных модулей.** Однако доступны опциональные модули, такие как показ статусов в Discord и Steam, для дополнительного функционала.
> Обновитесь, пожалуйста. > Эти модули **абсолютно опциональны** и могут быть удалены в любое время.
>
> - Модули находятся **[здесь](https://github.com/JonnyBro/beatrun/tree/main/lua/bin)**.
> - Ознакомьтесь с разделом **[Благодарности](#благодарности)** для их исходного кода.
---
## Установка
### 🔧 Автоматическая установка (Рекомендуется для Windows 10/11)
Запустите команду ниже в Powershell (запустите от администратора если Steam или игра расположены на диске C:).
> [!NOTE] > [!NOTE]
> Win + R > `powershell` > *Enter* > Windows 7 и старые версии Windows 10 не поддерживаются. Обновите свою ОС.
Запустите данную команду в PowerShell (Запустите от админа если Steam и/или игра установлены на системный (C:) диск):
```powershell ```powershell
irm https://beatrun.jonnybro.ru/install | iex irm https://beatrun.jonnybro.ru/install | iex
``` ```
* Запустить игру. 1. Запустите игру.
* Выбрать режим `Beatrun` в правом нижнем углу. 2. Выберите режим `Beatrun` в правом нижнем углу.
## Ручная установка ### 🛠️ Ручная установка
1. **[Скачать репозиторий](https://github.com/JonnyBro/beatrun/archive/refs/heads/master.zip)**. 1. **[Скачать репозиторий](https://github.com/JonnyBro/beatrun/archive/refs/heads/master.zip)**.
1. **Удалить папку `beatrun` в *путь_к_игре/garrysmod/addons*, если у вас такова имеется.** 2. Удалите папку `beatrun` в `путь_к_игре/garrysmod/addons`, если она существует.
1. Извлечь папку `beatrun-main/beatrun` в *путь_к_игре/garrysmod/addons*. 3. Извлеките `beatrun-main/beatrun` в `путь_к_игре/garrysmod/addons`.
1. Если вы хотите показ статуса в Discord и Steam: 4. *(Опционально)* Для показа статусов в Discord и Steam извлеките `beatrun-main/lua` в `путь_к_игре/garrysmod`.
* Извлечь папку `beatrun-main/lua` в *путь_к_игре/garrysmod*. 5. Запустите игру.
1. Запустить игру. 6. Выберите режим `Beatrun` в правом нижнем углу.
1. Выбрать режим `Beatrun` в правом нижнем углу.
---
## Особенности и обновления
### Новые возможности
- **База курсов** от Jonny_Bro: **[Доступна здесь](https://courses.jonnybro.ru)** (бесплатна и имеет **[открытый исходный код](https://git.jonnybro.ru/jonny_bro/beatrun-courses-server)**).
- **Новый режим:** Deathmatch.
- Полностью исправленный Kick Glitch, как в **[оригинальной игре](https://www.youtube.com/watch?v=zK5y3NBUStc)**.
- Меню настроек в игре в категории **Beatrun** в меню Инструментов.
Здесь можно настроить **все** параметры Beatrun.
- Поддержка локализации на **7 языках**.
- Улучшенный режим строительства курсов:
Пропы из меню спавна сохраняются в вашем курсе.
- Новые способности:
- **Перекат после зиплайнов:** Нажмите `CTRL`.
- **Слезание с лестниц:** Нажмите `CTRL`.
- **Удаление зиплайнов:** Нажмите ПКМ (`RMB`).
- **Указатель следующего чекпоинта** для облегчения навигации.
- Новые серверные и клиентские переменные:
- Серверные:
- `Beatrun_AllowOverdriveInMultiplayer` — разрешает Overdrive в мультиплеере.
- `Beatrun_AllowPropSpawn` — разрешает спавн пропов и оружия без прав администратора.
- `Beatrun_HealthRegen` — переключает регенерацию здоровья.
- Клиентские:
- `Beatrun_HUDTextColor`, `Beatrun_HUDCornerColor`, `Beatrun_HUDFloatingXPColor` — настройка цветов интерфейса.
- `Beatrun_DisableGrapple` — включение/выключение крюка-кошки.
- `Beatrun_OldKickGlitch` — переключение между старым и новым Kick Glitch.
- `Beatrun_QuickturnHandsOnly` — ограничение QuickTurn только для оружия Runner Hands.
- Прочие улучшения:
- Лёгкий толчок камеры при нырянии.
- SteamID больше не отображается на экране.
### Исправления
- Исправлено отображение моделей игроков как `ERROR` от первого лица.
- Улучшена сортировка таблиц лидеров в режимах.
- Исправлены краши и баги в режиме Data Theft.
- Включены прыжки при ходьбе.
- Крюк-кошка теперь следует за перемещаемыми объектами и видна другим игрокам.
---
## Анимации ## Анимации
Установщик анимаций был удалён, теперь анимации можно переключить в меню Инструментов в категории Beatrun. Установщик анимаций удалён. Теперь их можно переключать в **меню Инструментов** в категории Beatrun.
## Отличия от оригинала ---
> [!IMPORTANT]
> Множество изменений не задокументированы, проверьте коммиты для полного списка изменений.
* Jonny_Bro поддерживает свою **[базу курсов](https://courses.jonnybro.ru)**, которая так же **бесплатна** для использования и имеет **[открытый исходный код](https://git.jonnybro.ru/jonny_bro/beatrun-courses-server-docker)**!
* Новый режим - **Deathmatch** (намного интереснее Data Theft, честно).
* Оригинальный Kick Glitch как в **[оригинальной игре](https://www.youtube.com/watch?v=zK5y3NBUStc)**.
* Внутриигровое меню настроек - оно находится в меню Инструментов в категории **Beatrun**.\
Там можно найти **все** настройки Beatrun!
* Показ статуса в Discord и Steam.
* Поддержка локализации.\
Доступно на 7 языках!
* Изменения в режиме строительства курсов.\
Любой проп из меню спавна теперь сохраняется в курсе.
* Возможность переката на кнопку приседания (CTRL) после зиплайнов (спасибо c4nk <3).
* Возможность спрыгивать с лестниц на кнопку приседания (CTRL).
* Возможность удалять зиплайны, созданные *Zipline Gun* по нажатию на второстепенный огонь (ПКМ).
* Стрелка, указывающая на следующий чекпоинт.
* Серверная переменная которая разрешает использование Overdrive в мультиплеере - `Beatrun_AllowOverdriveInMultiplayer`.
* Серверная переменная которая разрешает создание оружия и объектов из меню спавна без прав администратора - `Beatrun_AllowPropSpawn`.
* Серверная переменная которая переключает регенерацию здоровья - `Beatrun_HealthRegen`.
* Клиентские переменные для изменения цвета интерфейса - `Beatrun_HUDTextColor`, `Beatrun_HUDCornerColor`, `Beatrun_HUDFloatingXPColor`.
* Клиентская переменная которая переключает использование крюка-кошки - `Beatrun_DisableGrapple`.
* Клиентская переменная которая переключает использование старого и нового Kick Glitch - `Beatrun_OldKickGlitch`.
* Клиентская переменная которая переключает быстрый разворот с оружием или только с *Runner Hands* - `Beatrun_QuickturnHandsOnly`.
* Небольшой толчок камеры при нырянии.
* SteamID больше не видно на экране.
## Исправления
* Некоторые модельки игрока отображались как ERROR от первого лица.
* Сортировка таблиц лидеров в режимах.
* Использование крюка-кошки в режимах и курсах.
* Краш игры в режиме Data Theft при использовании Data Bank.
* Урон между игроками проходил только в Data Theft.
* Разрешены прыжки при ходьбе.
* Возможность переката **под** объектами.
* Крюк-кошка теперь следует за объектом к которому она присоединена, так же её видят другие игроки.
## Известные проблемы ## Известные проблемы
* [Проблемы](https://github.com/JonnyBro/beatrun/issues). - Полный список доступен **[здесь](https://github.com/JonnyBro/beatrun/issues)**.
---
## Связанные проекты ## Связанные проекты
* [Проект Beatrun Reanimated](https://github.com/JonnyBro/beatrun-anims). - **[Beatrun Reanimated Project](https://github.com/JonnyBro/beatrun-anims)**
---
## Благодарности ## Благодарности
* [Все участники](https://github.com/JonnyBro/beatrun/graphs/contributors) - <3. - **[Все участники](https://github.com/JonnyBro/beatrun/graphs/contributors)** ❤️
* [EarthyKiller127/datae](https://www.youtube.com/channel/UCiFqPwGo4x0J65xafIaECDQ) - Создатель оригинального Beatrun. - [EarthyKiller127/datae](https://www.youtube.com/channel/UCiFqPwGo4x0J65xafIaECDQ) — создатель оригинального Beatrun.
* [relaxtakenotes](https://github.com/relaxtakenotes) - Без него этот проект не существовал бы. - [relaxtakenotes](https://github.com/relaxtakenotes) — этот проект стал возможен благодаря ему.
* [MTB](https://www.youtube.com/@MTB396) - Проект Beatrun Reanimated. - [MTB](https://www.youtube.com/@MTB396) — проект Beatrun Reanimated.
* [Fluffy Servers](https://github.com/fluffy-servers/gmod-discord-rpc) - Модуль показа статусов в Discord. - [Fluffy Servers](https://github.com/fluffy-servers/gmod-discord-rpc) — модуль показа статусов в Discord.
* [YuRaNnNzZZ](https://github.com/YuRaNnNzZZ/gmcl_steamrichpresencer) - Модуль показа статусов в Steam (создатель TFA Base!). - [YuRaNnNzZZ](https://github.com/YuRaNnNzZZ/gmcl_steamrichpresencer) — модуль показа статусов в Steam (создатель TFA Base).

View file

@ -50,7 +50,7 @@ beatrun.hud.lvl=Lvl: %s
beatrun.hud.infector=Infector beatrun.hud.infector=Infector
# Menu_Course # Menu_Course
beatrun.coursemenu.trials=Courses - %s beatrun.coursemenu.trials=Courses - Folder: %s
beatrun.coursemenu.buildmode=Toggle Build Mode beatrun.coursemenu.buildmode=Toggle Build Mode
beatrun.coursemenu.freeplay=Return to Freeplay beatrun.coursemenu.freeplay=Return to Freeplay
@ -272,6 +272,8 @@ beatrun.infection.end=The game has ended!\nSurvivors: %s\nRestarting in 15s
# Server ConVars # Server ConVars
beatrun.randommwloadouts=Random MW Base Loadouts beatrun.randommwloadouts=Random MW Base Loadouts
beatrun.randommwloadoutsdesc=Toggles random MW Base loadouts in Deathmatch and DataTheft beatrun.randommwloadoutsdesc=Toggles random MW Base loadouts in Deathmatch and DataTheft
beatrun.randoarc9loadouts=Random ARC9 MW Loadouts
beatrun.randoarc9loadoutsdesc=Toggles random ARC9 MW 2019 loadouts in Deathmatch and DataTheft
# Button hints thingy # Button hints thingy
beatrun.buttonhints.hold=(Hold) beatrun.buttonhints.hold=(Hold)

View file

@ -41,6 +41,7 @@ beatrun.convars.disablegrapple=Wyłącz zdolność używania tyrolki
beatrun.convars.puristmode=Tryb purystyczny to opcja po stronie klienta, która poważnie ogranicza zdolność do strafe'owania w powietrzu, tak jak w grach z serii ME.\n0 = Brak ograniczeń\n1 = Zmniejszona prędkość ruchu w powietrzu. beatrun.convars.puristmode=Tryb purystyczny to opcja po stronie klienta, która poważnie ogranicza zdolność do strafe'owania w powietrzu, tak jak w grach z serii ME.\n0 = Brak ograniczeń\n1 = Zmniejszona prędkość ruchu w powietrzu.
beatrun.convars.quickturnground=Umożliwia szybki obrót za pomocą ataku drugorzędnego na ziemi beatrun.convars.quickturnground=Umożliwia szybki obrót za pomocą ataku drugorzędnego na ziemi
beatrun.convars.quickturnhandsonly=Umożliwia szybki obrót tylko w trybie "Rąk biegacza" beatrun.convars.quickturnhandsonly=Umożliwia szybki obrót tylko w trybie "Rąk biegacza"
beatrun.convars.showspeedometer=Przełącz widoczność prędkościomierza
# HUD # HUD
beatrun.hud.course=Bieg: %s beatrun.hud.course=Bieg: %s
@ -53,7 +54,7 @@ beatrun.coursemenu.trials=Biegi - %s
beatrun.coursemenu.buildmode=Przełącz tryb budowania beatrun.coursemenu.buildmode=Przełącz tryb budowania
beatrun.coursemenu.freeplay=Wróć do rozgrywki swobodnej beatrun.coursemenu.freeplay=Wróć do rozgrywki swobodnej
# CoursesDatabase # Courses Database
beatrun.coursesdatabase.cantuploadfreeplay=Nie można przesyłać biegów w trybie rozgrywki swobodnej beatrun.coursesdatabase.cantuploadfreeplay=Nie można przesyłać biegów w trybie rozgrywki swobodnej
beatrun.coursesdatabase.upload1=Próbujesz przesłać kurs o nazwie %s na mapie %s. beatrun.coursesdatabase.upload1=Próbujesz przesłać kurs o nazwie %s na mapie %s.
beatrun.coursesdatabase.upload2=Użyj Beatrun_Confirm, aby kontynuować lub Beatrun_Cancel, aby anulować. beatrun.coursesdatabase.upload2=Użyj Beatrun_Confirm, aby kontynuować lub Beatrun_Cancel, aby anulować.
@ -62,6 +63,7 @@ beatrun.coursesdatabase.update1=Próbujesz zaktualizować bieg oznaczony kodem %
# Tools Menu # Tools Menu
beatrun.toolsmenu.client=Klient beatrun.toolsmenu.client=Klient
beatrun.toolsmenu.server=Serwer beatrun.toolsmenu.server=Serwer
beatrun.toolsmenu.extra=Ekstra
# Tools Menu Courses Section # Tools Menu Courses Section
beatrun.toolsmenu.courses.name=Biegi beatrun.toolsmenu.courses.name=Biegi
@ -106,8 +108,14 @@ beatrun.toolsmenu.hud.nametagsdesc=Włącz/Wyłącz wyświetlanie identyfikator
beatrun.toolsmenu.hud.hudxp=Wyświetl PD na interfejsie beatrun.toolsmenu.hud.hudxp=Wyświetl PD na interfejsie
beatrun.toolsmenu.hud.hudxpdesc=Pokaż całkowitą liczbę PD w pobliżu swojego nicku beatrun.toolsmenu.hud.hudxpdesc=Pokaż całkowitą liczbę PD w pobliżu swojego nicku
beatrun.toolsmenu.hud.keystrokes=Show Keystrokes beatrun.toolsmenu.hud.showspeedometer=Pokaż prędkościomierz
beatrun.toolsmenu.hud.keystrokesdesc=Shows keys that you press beatrun.toolsmenu.hud.showspeedometerdesc=Pokazuje prędkościomierz na interfejsie
beatrun.toolsmenu.hud.showSpeedometer=Pokaż prędkościomierz
beatrun.toolsmenu.hud.showSpeedometerDesc=Pokazuje prędkościomierz na interfejsie (ukrycie interfejsu nie wpływa na to ustawienie)
beatrun.toolsmenu.hud.keystrokes=Pokaż naciśnięte klawisze
beatrun.toolsmenu.hud.keystrokesdesc=Pokazuje na interfejsie klawisze, które wciskasz podczas gry
beatrun.toolsmenu.hud.hidden=Ukryj interfejs beatrun.toolsmenu.hud.hidden=Ukryj interfejs
beatrun.toolsmenu.hud.hiddendesc=0 - Pokazany\n1 - Tylko poza rozgrywką swobodną\n2 - Ukryty beatrun.toolsmenu.hud.hiddendesc=0 - Pokazany\n1 - Tylko poza rozgrywką swobodną\n2 - Ukryty
@ -124,7 +132,7 @@ beatrun.toolsmenu.camera.name=Kołysanie kamery w ruchu
beatrun.toolsmenu.camera.desc=Ustawienia kołysania kamery w ruchu beatrun.toolsmenu.camera.desc=Ustawienia kołysania kamery w ruchu
beatrun.toolsmenu.camera.stabilization=Stabilizacja kołysania kamery w ruchu beatrun.toolsmenu.camera.stabilization=Stabilizacja kołysania kamery w ruchu
beatrun.toolsmenu.camera.stabilizationdesc=Włącz, aby zmniejszyć chorobę lokomocyjną za pomocą utrzymywania stabilności kamery w ruchu beatrun.toolsmenu.camera.stabilizationdesc=Włącz, aby zmniejszyć efekt powodujący chorobę lokomocyjną za pomocą utrzymywania stabilności kamery w ruchu
beatrun.toolsmenu.camera.intensity=Intensywność kołysania kamery w ruchu beatrun.toolsmenu.camera.intensity=Intensywność kołysania kamery w ruchu
beatrun.toolsmenu.camera.fov=Pole widzenia beatrun.toolsmenu.camera.fov=Pole widzenia
beatrun.toolsmenu.camera.fovdesc=Zmienia pole widzenia beatrun.toolsmenu.camera.fovdesc=Zmienia pole widzenia

View file

@ -50,7 +50,7 @@ beatrun.hud.lvl=Лвл: %s
beatrun.hud.infector=Заражённый beatrun.hud.infector=Заражённый
# Menu_Course # Menu_Course
beatrun.coursemenu.trials=Курсы - %s beatrun.coursemenu.trials=Курсы - Папка: %s
beatrun.coursemenu.buildmode=Режим строительства beatrun.coursemenu.buildmode=Режим строительства
beatrun.coursemenu.freeplay=Свободная игра beatrun.coursemenu.freeplay=Свободная игра
@ -269,6 +269,8 @@ beatrun.infection.end=Игра окончена!\nВыжившие: %s\nПере
# Server ConVars # Server ConVars
beatrun.randommwloadouts=Случайные наборы оружия MW Base beatrun.randommwloadouts=Случайные наборы оружия MW Base
beatrun.randommwloadoutsdesc=Переключает случайные наборы оружия MW Base в Deathmatch и DataTheft beatrun.randommwloadoutsdesc=Переключает случайные наборы оружия MW Base в Deathmatch и DataTheft
beatrun.randoarc9loadouts=Случайные наборы оружия ARC9 MW
beatrun.randoarc9loadoutsdesc=Переключает случайные наборы оружия ARC9 MW 2019 в Deathmatch и DataTheft
# Button Hints # Button Hints
beatrun.buttonhints.hold=(держать) beatrun.buttonhints.hold=(держать)

View file

@ -50,7 +50,7 @@ beatrun.hud.lvl=Лвл: %s
beatrun.hud.infector=Заражений beatrun.hud.infector=Заражений
# Menu_Course # Menu_Course
beatrun.coursemenu.trials=Курси - %s beatrun.coursemenu.trials=Курси - Папка: %s
beatrun.coursemenu.buildmode=Режим будівництва beatrun.coursemenu.buildmode=Режим будівництва
beatrun.coursemenu.freeplay=Вільна гра beatrun.coursemenu.freeplay=Вільна гра

View file

@ -37,7 +37,7 @@ function ENT:StartTouch(ent)
end end
function ENT:Touch(ent) function ENT:Touch(ent)
if ent:IsPlayer() then if ent:IsPlayer() and GetGlobalBool("GM_INFECTION") then
if CurTime() > ent.MemeTime then if CurTime() > ent.MemeTime then
if not ent.MemeMessage then if not ent.MemeMessage then
ent:ChatPrint("Are you having fun standing still in a parkour game? Let's spice things up a bit!") ent:ChatPrint("Are you having fun standing still in a parkour game? Let's spice things up a bit!")

View file

@ -64,7 +64,7 @@ function ENT:BRCollisionFunc(ent)
local dmginfo = DamageInfo() local dmginfo = DamageInfo()
dmginfo:SetAttacker(self) dmginfo:SetAttacker(self)
dmginfo:SetDamage(1000) dmginfo:SetDamage(math.huge)
dmginfo:SetDamageType(DMG_DISSOLVE) dmginfo:SetDamageType(DMG_DISSOLVE)
ent:TakeDamageInfo(dmginfo) ent:TakeDamageInfo(dmginfo)
ent:EmitSound("bigspark" .. math.random(1, 2) .. ".wav") ent:EmitSound("bigspark" .. math.random(1, 2) .. ".wav")

View file

@ -44,7 +44,7 @@ function ENT:StartTouch(ent)
ent:SetNW2Int("CPNum", ent:GetNW2Int("CPNum", 1) + 1) ent:SetNW2Int("CPNum", ent:GetNW2Int("CPNum", 1) + 1)
if ent:GetNW2Int("CPNum", 1) > table.Count(Checkpoints) then if ent:GetNW2Int("CPNum", 1) > table.Count(Checkpoints) then
-- ReplayStop(ent) ReplayStop(ent, false)
FinishCourse(ent) FinishCourse(ent)
else else
ent.CPSavePos = ent:GetPos() ent.CPSavePos = ent:GetPos()

View file

@ -99,8 +99,6 @@ function SWEP:Deploy()
self:SetWasOnGround(false) self:SetWasOnGround(false)
self:SetBlockAnims(false) self:SetBlockAnims(false)
self:SetPunch(1) self:SetPunch(1)
return true
end end
function SWEP:Initialize() function SWEP:Initialize()
@ -223,14 +221,16 @@ function SWEP:Think()
local eyeang = ply:EyeAngles() local eyeang = ply:EyeAngles()
eyeang.x = 0 eyeang.x = 0
if insidestep and viewmodel:GetCycle() <= 0.1 and GetConVar("Beatrun_QuakeJump"):GetBool() then if insidestep and GetConVar("Beatrun_QuakeJump"):GetBool() then
if SERVER then if (!GetConVar("Beatrun_QuakeJump_Timing"):GetBool() and viewmodel:GetCycle() <= 0.1) or ply:GetNWBool("Beatrun_ExtraQuakeJumpTiming") then
ply:EmitSound("quakejump.mp3", 100, 100, 0.2) if SERVER then
ply:EmitSound("quakejump.mp3", 100, 100, 0.2)
end
ply.QuakeJumping = true
self:SetQuakeJumping(true)
end end
ply.QuakeJumping = true
self:SetQuakeJumping(true)
end end
if not ismoving and not ply:Crouching() then if not ismoving and not ply:Crouching() then

View file

@ -23,6 +23,9 @@ end
local addons = 0 local addons = 0
local incompatible = { local incompatible = {
["2155366756"] = true, -- VManip (Base)
["2364206712"] = true, -- [VManip] Vaulting
["2416989205"] = true, -- [VManip] Quick Slide
["1581533176"] = true, -- The Aperture [Reupload] ["1581533176"] = true, -- The Aperture [Reupload]
["2675972006"] = true, -- Custom Loadout ["2675972006"] = true, -- Custom Loadout
["378401390"] = true, -- Quake/Half-Life View bobbing ["378401390"] = true, -- Quake/Half-Life View bobbing
@ -49,9 +52,10 @@ local incompatible = {
["2824714462"] = true, -- [TFA] Screen Shake ["2824714462"] = true, -- [TFA] Screen Shake
["3037375111"] = true, -- Quick Slide With Legs ["3037375111"] = true, -- Quick Slide With Legs
["748422181"] = true, -- FOV Changer ["748422181"] = true, -- FOV Changer
["2930331275"] = true, -- Realistic Fragmentation System ["2919970981"] = true, -- Realistic Fragmentation System [OLD]
["112806637"] = true, -- Gmod Legs 3 ["112806637"] = true, -- Gmod Legs 3
["678037029"] = true -- Enhanced Camera ["678037029"] = true, -- Enhanced Camera
["2497150824"] = true -- Smooth Camera
} }
local warnpanel = { local warnpanel = {

View file

@ -448,6 +448,7 @@ hook.Add("Think", "BodyAnimThink", function()
if not IsValid(BodyAnim) then return end if not IsValid(BodyAnim) then return end
local ply = LocalPlayer() local ply = LocalPlayer()
SlowmoMultiplier = ply:GetLaggedMovementValue()
if not ply:Alive() and not deathanim then if not ply:Alive() and not deathanim then
RemoveBodyAnim() RemoveBodyAnim()
@ -455,7 +456,7 @@ hook.Add("Think", "BodyAnimThink", function()
return return
end end
BodyAnimCycle = BodyAnimCycle + FrameTime() / BodyAnim:SequenceDuration() * BodyAnimSpeed BodyAnimCycle = BodyAnimCycle + FrameTime() / BodyAnim:SequenceDuration() * BodyAnimSpeed * SlowmoMultiplier
if not customcycle then if not customcycle then
BodyAnim:SetCycle(BodyAnimCycle) BodyAnim:SetCycle(BodyAnimCycle)

View file

@ -51,7 +51,7 @@ hook.Add("RenderScreenspaceEffects", "BeatrunNoclipBW", function()
end end
if noclipping then if noclipping then
color = math.Approach(color, 0.5, RealFrameTime()) --color = math.Approach(color, 0.5, RealFrameTime())
elseif inp then elseif inp then
color = math.Approach(color, 1, RealFrameTime() * 2) color = math.Approach(color, 1, RealFrameTime() * 2)
end end

View file

@ -1,5 +1,3 @@
local OldAnims = CreateClientConVar("Beatrun_OldAnims", "0", true, false, "")
local animtable = { local animtable = {
lockang = false, lockang = false,
allowmove = true, allowmove = true,
@ -10,11 +8,17 @@ local animtable = {
BodyLimitX = 90, BodyLimitX = 90,
AnimString = "jumpslow", AnimString = "jumpslow",
CamIgnoreAng = true, CamIgnoreAng = true,
animmodelstring = "new_climbanim", animmodelstring = "climbanim",
BodyLimitY = 180, BodyLimitY = 180,
usefullbody = 2 usefullbody = 2
} }
changedanimset = false
if UseOldAnims:GetBool() then
animtable.animmodelstring = "meclimbanim"
end
fbanims = { fbanims = {
ladderexittoplefthand = true, ladderexittoplefthand = true,
runfwdstart = true, runfwdstart = true,
@ -1342,11 +1346,51 @@ hook.Add("CalcViewModelView", "lol", function(wep, vm, oldpos, oldang, pos, ang)
end) end)
local function JumpAnim(event, ply) local function JumpAnim(event, ply)
if !animsetchange then animsetchange = false end
--print("-------------")
--print("JumpAnim called -- " .. engine.TickCount())
if animsetchange != UseOldAnims:GetBool() then
--print("---- BodyAnim removed -- " .. engine.TickCount())
RemoveBodyAnim()
end
if animsetchange != UseOldAnims:GetBool() then
if UseOldAnims:GetBool() then
animtable.animmodelstring = "meclimbanim"
else
animtable.animmodelstring = "climbanim"
end
StartBodyAnim(animtable)
--print("---- BodyAnim recreated -- " .. engine.TickCount())
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 if events[event] then
--print("-- JumpAnim in event -- " .. engine.TickCount())
local wasjumpanim = fbanims[BodyAnimString] and IsValid(BodyAnim) local wasjumpanim = fbanims[BodyAnimString] and IsValid(BodyAnim)
if changedanimset then
wasjumpanim = false
end
if not wasjumpanim then if not wasjumpanim then
RemoveBodyAnim() --print("---- BodyAnim removed -- " .. engine.TickCount())
--RemoveBodyAnim()
end end
if event == "jump" or event == "jumpfar" or event:Left(11) == "jumpwallrun" and ply:GetWallrunDir():Dot(ply:EyeAngles():Forward()) < 0.75 then if event == "jump" or event == "jumpfar" or event:Left(11) == "jumpwallrun" and ply:GetWallrunDir():Dot(ply:EyeAngles():Forward()) < 0.75 then
@ -1377,6 +1421,7 @@ local function JumpAnim(event, ply)
CheckAnims() CheckAnims()
StartBodyAnim(animtable) StartBodyAnim(animtable)
--print("---- BodyAnim recreated -- " .. engine.TickCount())
if not IsValid(BodyAnim) then return end if not IsValid(BodyAnim) then return end
@ -1399,39 +1444,9 @@ local function JumpAnim(event, ply)
BodyAnim:ResetSequence(BodyAnim:LookupSequence(BodyAnimString)) BodyAnim:ResetSequence(BodyAnim:LookupSequence(BodyAnimString))
end end
end end
animsetchange = UseOldAnims:GetBool()
end end
function CheckAnims()
RemoveBodyAnim()
if OldAnims:GetBool() then
animtable.animmodelstring = "old_climbanim"
else
animtable.animmodelstring = "new_climbanim"
end
StartBodyAnim(animtable)
if not IsValid(BodyAnim) then return end
CreateBodyAnimArmCopy()
if not LocalPlayer():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
end
cvars.AddChangeCallback("Beatrun_OldAnims", function(cvar, vOld, vNew)
CheckAnims()
end)
hook.Add("PlayerInitialSpawn", "CheckAnims", CheckAnims)
hook.Add("OnParkour", "JumpAnim", JumpAnim) hook.Add("OnParkour", "JumpAnim", JumpAnim)
function ArmInterrupt(anim) function ArmInterrupt(anim)

View file

@ -6,24 +6,34 @@ local color_black = Color(0, 0, 0)
local color_black_t = Color(0, 0, 0, 100) local color_black_t = Color(0, 0, 0, 100)
local size = 35 local size = 35
local function GetFormattedKey(bind)
local keyBind = input.LookupBinding(bind)
if keyBind == "MOUSE1" then keyBind = "LMB"
elseif keyBind == "MOUSE2" then keyBind = "RMB"
elseif keyBind == "MOUSE3" then keyBind = "MMB" end
if keyBind then
return string.upper(keyBind)
else
return "?"
end
end
local function ShowKeyStrokes() local function ShowKeyStrokes()
if showKeystrokes:GetBool() and GetConVar("Beatrun_HUDHidden"):GetInt() == 0 then if showKeystrokes:GetBool() and GetConVar("Beatrun_HUDHidden"):GetInt() == 0 then
local forward = string.upper(input.LookupBinding("+forward")) local forward = GetFormattedKey("+forward")
local back = string.upper(input.LookupBinding("+back")) local back = GetFormattedKey("+back")
local moveleft = string.upper(input.LookupBinding("+moveleft")) local moveleft = GetFormattedKey("+moveleft")
local moveright = string.upper(input.LookupBinding("+moveright")) local moveright = GetFormattedKey("+moveright")
local use = string.upper(input.LookupBinding("+use")) local use = GetFormattedKey("+use")
local reload = string.upper(input.LookupBinding("+reload")) local reload = GetFormattedKey("+reload")
local jump = string.upper(input.LookupBinding("+jump")) local jump = GetFormattedKey("+jump")
local speed = string.upper(input.LookupBinding("+speed")) local speed = GetFormattedKey("+speed")
local duck = string.upper(input.LookupBinding("+duck")) local duck = GetFormattedKey("+duck")
local attack = string.upper(input.LookupBinding("+attack")) local attack = GetFormattedKey("+attack")
local attack2 = string.upper(input.LookupBinding("+attack2")) local attack2 = GetFormattedKey("+attack2")
if attack == "MOUSE1" then attack = "LMB" end
if attack2 == "MOUSE2" then attack2 = "RMB" end
-- Key W
if LocalPlayer():KeyDown(IN_FORWARD) then if LocalPlayer():KeyDown(IN_FORWARD) then
surface.SetDrawColor(color_white_t) surface.SetDrawColor(color_white_t)
surface.DrawRect(size, 0, size, size) surface.DrawRect(size, 0, size, size)
@ -34,7 +44,6 @@ local function ShowKeyStrokes()
draw.SimpleText(forward, "BeatrunHUD", size + 10, size - 30, color_white) draw.SimpleText(forward, "BeatrunHUD", size + 10, size - 30, color_white)
end end
-- Key E
if LocalPlayer():KeyDown(IN_USE) then if LocalPlayer():KeyDown(IN_USE) then
surface.SetDrawColor(color_white_t) surface.SetDrawColor(color_white_t)
surface.DrawRect(size * 2, 0, size, size) surface.DrawRect(size * 2, 0, size, size)
@ -45,7 +54,6 @@ local function ShowKeyStrokes()
draw.SimpleText(use, "BeatrunHUD", size + 48, size - 30, color_white) draw.SimpleText(use, "BeatrunHUD", size + 48, size - 30, color_white)
end end
-- Key R
if LocalPlayer():KeyDown(IN_RELOAD) then if LocalPlayer():KeyDown(IN_RELOAD) then
surface.SetDrawColor(color_white_t) surface.SetDrawColor(color_white_t)
surface.DrawRect(size * 3, 0, size, size) surface.DrawRect(size * 3, 0, size, size)
@ -56,7 +64,6 @@ local function ShowKeyStrokes()
draw.SimpleText(reload, "BeatrunHUD", size * 3 + 12, size - 30, color_white) draw.SimpleText(reload, "BeatrunHUD", size * 3 + 12, size - 30, color_white)
end end
-- Key A
if LocalPlayer():KeyDown(IN_MOVELEFT) then if LocalPlayer():KeyDown(IN_MOVELEFT) then
surface.SetDrawColor(color_white_t) surface.SetDrawColor(color_white_t)
surface.DrawRect(0, size, size, size) surface.DrawRect(0, size, size, size)
@ -67,7 +74,6 @@ local function ShowKeyStrokes()
draw.SimpleText(moveleft, "BeatrunHUD", size - 23, size + 8, color_white) draw.SimpleText(moveleft, "BeatrunHUD", size - 23, size + 8, color_white)
end end
-- Key S
if LocalPlayer():KeyDown(IN_BACK) then if LocalPlayer():KeyDown(IN_BACK) then
surface.SetDrawColor(color_white_t) surface.SetDrawColor(color_white_t)
surface.DrawRect(size, size, size, size) surface.DrawRect(size, size, size, size)
@ -78,7 +84,6 @@ local function ShowKeyStrokes()
draw.SimpleText(back, "BeatrunHUD", size + 12, size + 8, color_white) draw.SimpleText(back, "BeatrunHUD", size + 12, size + 8, color_white)
end end
-- Key D
if LocalPlayer():KeyDown(IN_MOVERIGHT) then if LocalPlayer():KeyDown(IN_MOVERIGHT) then
surface.SetDrawColor(color_white_t) surface.SetDrawColor(color_white_t)
surface.DrawRect(size * 2, size, size, size) surface.DrawRect(size * 2, size, size, size)
@ -89,7 +94,6 @@ local function ShowKeyStrokes()
draw.SimpleText(moveright, "BeatrunHUD", size + 48, size + 8, color_white) draw.SimpleText(moveright, "BeatrunHUD", size + 48, size + 8, color_white)
end end
-- Space
if LocalPlayer():KeyDown(IN_JUMP) then if LocalPlayer():KeyDown(IN_JUMP) then
surface.SetDrawColor(color_white_t) surface.SetDrawColor(color_white_t)
surface.DrawRect(0, size * 2, size * 3, size) surface.DrawRect(0, size * 2, size * 3, size)
@ -100,7 +104,6 @@ local function ShowKeyStrokes()
draw.SimpleText(jump, "BeatrunHUD", 28, size * 2 + 8, color_white) draw.SimpleText(jump, "BeatrunHUD", 28, size * 2 + 8, color_white)
end end
-- Shift
if LocalPlayer():KeyDown(IN_SPEED) then if LocalPlayer():KeyDown(IN_SPEED) then
surface.SetDrawColor(color_white_t) surface.SetDrawColor(color_white_t)
surface.DrawRect(0, size * 3, size * 3, size) surface.DrawRect(0, size * 3, size * 3, size)
@ -111,7 +114,6 @@ local function ShowKeyStrokes()
draw.SimpleText(speed, "BeatrunHUD", 28, size * 3 + 8, color_white) draw.SimpleText(speed, "BeatrunHUD", 28, size * 3 + 8, color_white)
end end
-- Ctrl
if LocalPlayer():KeyDown(IN_DUCK) then if LocalPlayer():KeyDown(IN_DUCK) then
surface.SetDrawColor(color_white_t) surface.SetDrawColor(color_white_t)
surface.DrawRect(0, size * 4, size * 3, size) surface.DrawRect(0, size * 4, size * 3, size)
@ -122,7 +124,6 @@ local function ShowKeyStrokes()
draw.SimpleText(duck, "BeatrunHUD", 32, size * 4 + 8, color_white) draw.SimpleText(duck, "BeatrunHUD", 32, size * 4 + 8, color_white)
end end
-- Left Mouse
if LocalPlayer():KeyDown(IN_ATTACK) then if LocalPlayer():KeyDown(IN_ATTACK) then
surface.SetDrawColor(color_white_t) surface.SetDrawColor(color_white_t)
surface.DrawRect(size * 3, size, size * 2, size) surface.DrawRect(size * 3, size, size * 2, size)
@ -133,7 +134,6 @@ local function ShowKeyStrokes()
draw.SimpleText(attack, "BeatrunHUD", size + 87, size + 8, color_white) draw.SimpleText(attack, "BeatrunHUD", size + 87, size + 8, color_white)
end end
-- Right Mouse
if LocalPlayer():KeyDown(IN_ATTACK2) then if LocalPlayer():KeyDown(IN_ATTACK2) then
surface.SetDrawColor(color_white_t) surface.SetDrawColor(color_white_t)
surface.DrawRect(size * 3, size * 2, size * 2, size) surface.DrawRect(size * 3, size * 2, size * 2, size)

View file

@ -25,7 +25,7 @@ local function buildmodebutton()
LocalPlayer():ConCommand("buildmode") LocalPlayer():ConCommand("buildmode")
end end
AEUI:Text(coursepanel, language.GetPhrase("beatrun.coursemenu.trials"):format(game.GetMap()), "AEUIVeryLarge", 20, 30) AEUI:Text(coursepanel, language.GetPhrase("beatrun.coursemenu.trials"):format(string.Replace(game.GetMap(), " ", "-")), "AEUIVeryLarge", 20, 30)
local buildmodebutton = AEUI:AddButton(coursepanel, "#beatrun.coursemenu.buildmode", buildmodebutton, "AEUILarge", coursepanel.w - 400, coursepanel.h - 50) local buildmodebutton = AEUI:AddButton(coursepanel, "#beatrun.coursemenu.buildmode", buildmodebutton, "AEUILarge", coursepanel.w - 400, coursepanel.h - 50)
buildmodebutton.greyed = sacheck buildmodebutton.greyed = sacheck
@ -55,7 +55,7 @@ function OpenCourseMenu()
AEUI:AddPanel(coursepanel) AEUI:AddPanel(coursepanel)
AEUI:AddPanel(courselist) AEUI:AddPanel(courselist)
local dir = "beatrun/courses/" .. game.GetMap() .. "/" local dir = "beatrun/courses/" .. string.Replace(game.GetMap(), " ", "-") .. "/"
local dirsearch = dir .. "*.txt" local dirsearch = dir .. "*.txt"
local files = file.Find(dirsearch, "DATA", "datedesc") local files = file.Find(dirsearch, "DATA", "datedesc")

View file

@ -0,0 +1,69 @@
local function MyNeedsDepthPass()
return true
end
doffocus = CreateClientConVar("doftest_focus", 0, true, false, "", 0, 1)
doffocus2 = CreateClientConVar("doftest_focus2", 0, true, false, "", 0, 1)
local postprocessenable = CreateClientConVar("Beatrun_PostprocessEffects", 0, true, false, "Enables silly ahh post-processing effects. EXPERIMENTAL.", 0, 1)
-- Add hook so that the _rt_ResolvedFullFrameDepth texture is updated
hook.Add( "NeedsDepthPass", "MyNeedsDepthPass", MyNeedsDepthPass )
local blur_mat = Material('pp/bokehblur')
local BOKEN_FOCUS = 0
local BOKEN_FORCE = 0
cyclestate = false
hook.Add("RenderScreenspaceEffects", "funnybrdof", function()
if !postprocessenable:GetBool() then return end
local ply = LocalPlayer()
render.UpdateScreenEffectTexture(1)
local trace = {}
if not ply:ShouldDrawLocalPlayer() then
eye = ply:EyePos()
langles = ply:EyeAngles()
if ply:InVehicle() then
langles = ply:GetVehicle():GetAngles() + langles
end
else
eye = EyePos()
langles = EyeAngles()
ignoreEnts = true
end
trace.start = ply:EyePos()
trace.endpos = langles:Forward() * 300 + eye
trace.filter = function(ent)
return true
end
local tr = util.TraceLine(trace)
local dist = tr.HitPos:Distance(ply:GetPos())
if ply:GetSliding() or ply:GetClimbing() != 0 or ply:GetWallrun() == 1 or IsValid(ply:GetLadder()) then
BOKEN_FORCE = math.Clamp(BOKEN_FORCE + 0.03 * (FrameTime() * 66), 0,1)
else
BOKEN_FORCE = math.Clamp(BOKEN_FORCE - 0.03 * (FrameTime() * 66), 0,1)
end
blur_mat:SetTexture("$BASETEXTURE", render.GetScreenEffectTexture(1))
blur_mat:SetTexture("$DEPTHTEXTURE", render.GetResolvedFullFrameDepth())
blur_mat:SetFloat("$size", BOKEN_FORCE * 8)
blur_mat:SetFloat("$focus", 0)
blur_mat:SetFloat("$focusradius", 2 - 0.25 * 2)
--blur_mat:SetFloat("$size", BOKEN_FORCE * 3)
--blur_mat:SetFloat("$focus", 0)
--blur_mat:SetFloat("$focusradius", 2 - 0.5 * 3)
--print(BOKEN_FOCUS)
--render.SetMaterial(fbtexture)
--render.DrawScreenQuadEx(0,0,960,540)
render.SetMaterial(blur_mat)
render.DrawScreenQuad()
--render.DrawTextureToScreenRect(render.GetResolvedFullFrameDepth(),960,0,960,540)
end)

View file

@ -233,7 +233,7 @@ hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function()
panel:ClearControls() panel:ClearControls()
panel:SetName("#beatrun.toolsmenu.gameplay.desc") panel:SetName("#beatrun.toolsmenu.gameplay.desc")
panel:CheckBox("#beatrun.toolsmenu.gameplay.oldanims", "Beatrun_OldAnims") panel:CheckBox("#beatrun.toolsmenu.gameplay.oldanims", "Beatrun_UseOldAnims")
panel:ControlHelp("#beatrun.toolsmenu.gameplay.oldanimsdesc") panel:ControlHelp("#beatrun.toolsmenu.gameplay.oldanimsdesc")
panel:CheckBox("#beatrun.toolsmenu.gameplay.quickturnground", "Beatrun_QuickturnGround") panel:CheckBox("#beatrun.toolsmenu.gameplay.quickturnground", "Beatrun_QuickturnGround")
@ -353,6 +353,9 @@ hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function()
panel:CheckBox("#beatrun.randommwloadouts", "Beatrun_RandomMWLoadouts") panel:CheckBox("#beatrun.randommwloadouts", "Beatrun_RandomMWLoadouts")
panel:ControlHelp("#beatrun.randommwloadoutsdesc") panel:ControlHelp("#beatrun.randommwloadoutsdesc")
panel:CheckBox("#beatrun.randoarc9loadouts", "Beatrun_RandomARC9Loadouts")
panel:ControlHelp("#beatrun.randoarc9loadoutsdesc")
local DatatheftButton = vgui.Create("DButton", panel) local DatatheftButton = vgui.Create("DButton", panel)
DatatheftButton:SetText("#beatrun.toolsmenu.gamemodes.datatheft") DatatheftButton:SetText("#beatrun.toolsmenu.gamemodes.datatheft")
DatatheftButton:SetSize(0, 20) DatatheftButton:SetSize(0, 20)
@ -418,6 +421,28 @@ hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function()
-- panel:AddItem(LoadoutMenuButton) -- panel:AddItem(LoadoutMenuButton)
end) 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)
spawnmenu.AddToolMenuOption("Beatrun", "Extra", "beatrun_extra", "#beatrun.toolsmenu.extra.name", "", "", function(panel) spawnmenu.AddToolMenuOption("Beatrun", "Extra", "beatrun_extra", "#beatrun.toolsmenu.extra.name", "", "", function(panel)
panel:ClearControls() panel:ClearControls()
panel:SetName("#beatrun.toolsmenu.extra.desc") panel:SetName("#beatrun.toolsmenu.extra.desc")

View file

@ -1,3 +1,4 @@
--include("preexecute/client.lua")
include("shared.lua") include("shared.lua")
for _, v in ipairs(file.Find("gamemodes/beatrun/gamemode/cl/*.lua", "GAME")) do for _, v in ipairs(file.Find("gamemodes/beatrun/gamemode/cl/*.lua", "GAME")) do

View file

@ -6,6 +6,10 @@ for _, v in ipairs(file.Find("gamemodes/beatrun/gamemode/cl/*.lua", "GAME")) do
AddCSLuaFile("cl/" .. v) AddCSLuaFile("cl/" .. v)
end end
if SERVER then
include("preexecute/server.lua")
end
for _, v in ipairs(file.Find("gamemodes/beatrun/gamemode/sh/*.lua", "GAME")) do for _, v in ipairs(file.Find("gamemodes/beatrun/gamemode/sh/*.lua", "GAME")) do
AddCSLuaFile("sh/" .. v) AddCSLuaFile("sh/" .. v)
include("sh/" .. v) include("sh/" .. v)

View file

@ -11,6 +11,10 @@ if CLIENT then
local lframeswepclass = lframeswepclass or "" local lframeswepclass = lframeswepclass or ""
end end
if SERVER then
util.AddNetworkString("Beatrun_ClientFOVChange")
end
local PLAYER = {} local PLAYER = {}
PLAYER.DuckSpeed = 0.01 -- How fast to go from not ducking, to ducking PLAYER.DuckSpeed = 0.01 -- How fast to go from not ducking, to ducking
@ -21,6 +25,8 @@ PLAYER.TauntCam = TauntCamera()
PLAYER.WalkSpeed = 200 PLAYER.WalkSpeed = 200
PLAYER.RunSpeed = 400 PLAYER.RunSpeed = 400
local FOVModifierBlock = false -- trust me this is important -losttrackpad
function PLAYER:SetupDataTables() function PLAYER:SetupDataTables()
BaseClass.SetupDataTables(self) BaseClass.SetupDataTables(self)
self.Player:NetworkVar("Float", 0, "MEMoveLimit") self.Player:NetworkVar("Float", 0, "MEMoveLimit")
@ -124,26 +130,7 @@ end
function PLAYER:Loadout() function PLAYER:Loadout()
if GetGlobalBool("GM_DATATHEFT") or GetGlobalBool("GM_DEATHMATCH") then if GetGlobalBool("GM_DATATHEFT") or GetGlobalBool("GM_DEATHMATCH") then
if GetConVar("Beatrun_RandomMWLoadouts"):GetBool() then Beatrun_GiveGMWeapon(self.Player)
for i = 0, 1 do
local randomSWEP = getRandomMGBaseWeapon()
local w = self.Player:Give(randomSWEP.ClassName)
timer.Simple(1, function()
if w:GetPrimaryAmmoType() ~= -1 then self.Player:GiveAmmo(10000, w:GetPrimaryAmmoType(), true) end
if w:GetSecondaryAmmoType() ~= -1 then self.Player:GiveAmmo(5, w:GetSecondaryAmmoType(), true) end
end)
end
else
for _, v in ipairs(BEATRUN_GAMEMODES_LOADOUTS[math.random(#BEATRUN_GAMEMODES_LOADOUTS)]) do
local w = self.Player:Give(v)
timer.Simple(1, function()
if w:GetPrimaryAmmoType() ~= -1 then self.Player:GiveAmmo(10000, w:GetPrimaryAmmoType(), true) end
if w:GetSecondaryAmmoType() ~= -1 then self.Player:GiveAmmo(5, w:GetSecondaryAmmoType(), true) end
end)
end
end
else else
self.Player:RemoveAllAmmo() self.Player:RemoveAllAmmo()
end end
@ -223,8 +210,8 @@ function PLAYER:Spawn()
ply:SetPos(Course_StartPos) ply:SetPos(Course_StartPos)
end) end)
-- ReplayStop(ply) ReplayStop(ply, true)
-- ReplayStart(ply) ReplayStart(ply)
end end
end end
@ -369,9 +356,34 @@ end
function PLAYER:CalcView(view) function PLAYER:CalcView(view)
local mult = (self.Player:InOverdrive() and 1.1) or 1 local mult = (self.Player:InOverdrive() and 1.1) or 1
local fov = GetConVar("Beatrun_FOV"):GetInt() local fixfovmult = 1
view.fov = fov * mult if CLIENT then
-- VERY hacky and dirty code and I apologize in advance
local fov = GetConVar("Beatrun_FOV"):GetInt()
if IsValid(LocalPlayer():GetActiveWeapon()) then
if lframeswepclass ~= LocalPlayer():GetActiveWeapon():GetClass() then
-- SP clientside weapon swap detection
FOVModifierBlock = true
timer.Simple(1, function()
FOVModifierBlock = false
end)
end
if not FOVModifierBlock and not LocalPlayer():GetActiveWeapon().ARC9 then
fixfovmult = view.fov / fov
else
fixfovmult = 1
end
view.fov = fov * mult * fixfovmult
lframeswepclass = LocalPlayer():GetActiveWeapon():GetClass()
else
view.fov = fov * mult
end
end
if self.TauntCam:CalcView(view, self.Player, self.Player:IsPlayingTaunt()) then return true end if self.TauntCam:CalcView(view, self.Player, self.Player:IsPlayingTaunt()) then return true end
end end
@ -531,11 +543,38 @@ end)
hook.Add("PlayerSwitchWeapon", "BeatrunSwitchARC9FOVFix", function(ply) hook.Add("PlayerSwitchWeapon", "BeatrunSwitchARC9FOVFix", function(ply)
-- This ENTIRE hook is for dealing with ARC9's stupid FOV reset -- This ENTIRE hook is for dealing with ARC9's stupid FOV reset
-- behavior after switching away from an ARC9 SWEP. -- 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() timer.Simple(0, function()
ply:SetFOV(ply:GetInfoNum("Beatrun_FOV", 100)) ply:SetFOV(ply:GetInfoNum("Beatrun_FOV", 100))
end) end)
end) end)
hook.Add("InitPostEntity", "FOVChangeFix", function()
-- FOV change fix, don't tinker with this unless you know what you're doing...
cvars.AddChangeCallback("Beatrun_FOV", function(convar, oldval, newval)
if CLIENT and game.SinglePlayer() then
LocalPlayer():SetFOV(newval)
elseif CLIENT then
FOVModifierBlock = true
timer.Simple(0.16, function()
FOVModifierBlock = false
if not FOVModifierBlock then
net.Start("Beatrun_ClientFOVChange")
net.WriteInt(newval, 16)
net.SendToServer()
FOVModifierBlock = true
end
end)
end
end)
end)
if SERVER then
net.Receive("Beatrun_ClientFOVChange", function(len, ply)
ply:SetFOV(net.ReadInt(16))
end)
end
player_manager.RegisterClass("player_beatrun", PLAYER, "player_default") player_manager.RegisterClass("player_beatrun", PLAYER, "player_default")

View file

@ -0,0 +1 @@
-- This file does nothing for now.

View 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)

View file

@ -1,6 +1,9 @@
local vmatrixmeta = FindMetaTable("VMatrix") local vmatrixmeta = FindMetaTable("VMatrix")
local playermeta = FindMetaTable("Player") local playermeta = FindMetaTable("Player")
CreateConVar("Beatrun_RandomMWLoadouts", 0, {FCVAR_REPLICATED, FCVAR_ARCHIVE})
CreateConVar("Beatrun_RandomARC9Loadouts", 0, {FCVAR_REPLICATED, FCVAR_ARCHIVE})
BEATRUN_GAMEMODES_LOADOUTS = { BEATRUN_GAMEMODES_LOADOUTS = {
{"weapon_357", "weapon_ar2"} {"weapon_357", "weapon_ar2"}
} }
@ -87,3 +90,60 @@ function playermeta:notUsingRH(wep)
return false return false
end end
end end
function Beatrun_GiveAmmo(weapon, ply)
if weapon:GetPrimaryAmmoType() ~= -1 then ply:GiveAmmo(10000, weapon:GetPrimaryAmmoType(), true) end
if weapon:GetSecondaryAmmoType() ~= -1 then ply:GiveAmmo(5, weapon:GetSecondaryAmmoType(), true) end
end
function Beatrun_getRandomMWBaseSWEP()
local allWep = weapons.GetList()
local wepIndex = math.random(#allWep)
local wep = allWep[wepIndex]
if wep.Base == "mg_base" and not wep.AdminOnly then
return wep
else
return Beatrun_getRandomMWBaseSWEP()
end
end
function Beatrun_getRandomARC9SWEP()
local allWep = weapons.GetList()
local wepIndex = math.random(#allWep)
local wep = allWep[wepIndex]
if wep.Base == "arc9_cod2019_base" and not wep.AdminOnly then
return wep
else
return Beatrun_getRandomARC9SWEP()
end
end
function Beatrun_GiveGMWeapon(ply)
if GetConVar("Beatrun_RandomMWLoadouts"):GetBool() and not GetConVar("Beatrun_RandomARC9Loadouts"):GetBool() then
for i = 0, 1 do
local swep = Beatrun_getRandomMWBaseSWEP()
local w = ply:Give(swep.ClassName)
timer.Simple(1, function()
Beatrun_GiveAmmo(w, ply)
end)
end
elseif GetConVar("Beatrun_RandomARC9Loadouts"):GetBool() and not GetConVar("Beatrun_RandomMWLoadouts"):GetBool() then
for i = 0, 1 do
-- We don't need ammo because ARC9 got the infinite ammo option!
local swep = Beatrun_getRandomARC9SWEP()
ply:Give(swep.ClassName)
end
elseif not GetConVar("Beatrun_RandomARC9Loadouts"):GetBool() and not GetConVar("Beatrun_RandomMWLoadouts"):GetBool() then
for _, b in ipairs(BEATRUN_GAMEMODES_LOADOUTS[math.random(#BEATRUN_GAMEMODES_LOADOUTS)]) do
local w = v:Give(b)
timer.Simple(1, function()
Beatrun_GiveAmmo(w, ply)
end)
end
end
end

View file

@ -576,7 +576,7 @@ if SERVER then
end end
function Beatrun_ReadCourseLocal(id) function Beatrun_ReadCourseLocal(id)
local dir = "beatrun/courses/" .. game.GetMap() .. "/" local dir = "beatrun/courses/" .. string.Replace(game.GetMap(), " ", "-") .. "/"
local save = file.Read(dir .. id .. ".txt", "DATA") local save = file.Read(dir .. id .. ".txt", "DATA")
if not save then if not save then
@ -943,7 +943,7 @@ if CLIENT then
local save = CourseData(name) local save = CourseData(name)
local jsonsave = util.TableToJSON(save) local jsonsave = util.TableToJSON(save)
local id = util.CRC(jsonsave) local id = util.CRC(jsonsave)
local dir = "beatrun/courses/" .. game.GetMap() .. "/" local dir = "beatrun/courses/" .. string.Replace(game.GetMap(), " ", "-") .. "/"
if compress == nil then compress = true end if compress == nil then compress = true end
@ -1011,7 +1011,7 @@ if CLIENT then
--[[ --[[
concommand.Add("Beatrun_PrintCourse", function(ply, cmd, args, argstr) concommand.Add("Beatrun_PrintCourse", function(ply, cmd, args, argstr)
local dir = "beatrun/courses/" .. game.GetMap() .. "/" local dir = "beatrun/courses/" .. string.Replace(game.GetMap(), " ", "-") .. "/"
local save = file.Read(dir .. args[1] .. ".txt", "DATA") local save = file.Read(dir .. args[1] .. ".txt", "DATA")
if not save then if not save then

View file

@ -134,7 +134,7 @@ if CLIENT then
LocalPlayer():EmitSound("A_TT_Finish_Positive.wav") LocalPlayer():EmitSound("A_TT_Finish_Positive.wav")
SaveCheckpointTime() SaveCheckpointTime()
-- SaveReplayData() SaveReplayData()
else else
timetext = "+" .. string.FormattedTime(math.abs(timestr), "%02i:%02i:%02i") timetext = "+" .. string.FormattedTime(math.abs(timestr), "%02i:%02i:%02i")
timecolor = color_negative timecolor = color_negative
@ -144,6 +144,9 @@ if CLIENT then
net.Start("Checkpoint_Finish") net.Start("Checkpoint_Finish")
net.WriteFloat(totaltime) net.WriteFloat(totaltime)
if !LocalPlayer().InReplay then
notification.AddLegacy("Replay saved as ".."beatrun/replays/" .. game.GetMap() .. "/"..Course_Name .. os.date("%H-%M-%S_%d-%m-%Y", os.time()) .. ".txt", 0, 3)
end
net.SendToServer() net.SendToServer()
timealpha = 1000 timealpha = 1000
@ -169,7 +172,7 @@ local finishcolor = Color(45, 45, 175, 100)
function FinishCourse(ply) function FinishCourse(ply)
ply:ScreenFade(SCREENFADE.IN, finishcolor, 0, 4) ply:ScreenFade(SCREENFADE.IN, finishcolor, 0, 4)
-- ply:SetLaggedMovementValue(0.1) ply:SetLaggedMovementValue(0.1)
ply:DrawViewModel(false) ply:DrawViewModel(false)
net.Start("Checkpoint_Finish") net.Start("Checkpoint_Finish")
@ -178,7 +181,7 @@ function FinishCourse(ply)
ply:SetNW2Int("CPNum", -1) ply:SetNW2Int("CPNum", -1)
timer.Simple(4, function() timer.Simple(4, function()
-- ply:SetLaggedMovementValue(1) ply:SetLaggedMovementValue(1)
ply:DrawViewModel(true) ply:DrawViewModel(true)
end) end)
end end
@ -305,13 +308,42 @@ function CourseHUD()
end end
end end
if incourse and pbtimes then if incourse and !ply.InReplay then
local text = string.FormattedTime(totaltime, "%02i:%02i:%02i")
local w, _ = surface.GetTextSize(text)
surface.SetFont("BeatrunHUD")
surface.SetTextColor(text_color)
surface.SetTextPos(ScrW() * 0.87 - w + vpx, ScrH() * 0.075 + vpz)
surface.DrawText(text)
end
if incourse and pbtimes and !ply.InReplay then
local text = string.FormattedTime(pbtotal, "%02i:%02i:%02i") local text = string.FormattedTime(pbtotal, "%02i:%02i:%02i")
local w, h = surface.GetTextSize(text) local w, h = surface.GetTextSize(text)
pbcolor = text_color
pbcolor.r = text_color.r * 0.6
pbcolor.g = text_color.g * 0.6
pbcolor.b = text_color.b * 0.6
surface.SetFont("BeatrunHUD") surface.SetFont("BeatrunHUD")
surface.SetTextPos(ScrW() * 0.85 - w * 0.5 + vpx, ScrH() * 0.075 + h + vpz) surface.SetTextPos(ScrW() * 0.87 - w + vpx, ScrH() * 0.075 + h + vpz)
surface.SetTextColor(255, 255, 255, 125) surface.SetTextColor(pbcolor)
surface.DrawText(text)
end
if incourse and ply.InReplay then
local text = string.FormattedTime(tickcount * engine.TickInterval(), "%02i:%02i:%02i") .. " / " .. string.FormattedTime(#ply.ReplayTicks * engine.TickInterval(), "%02i:%02i:%02i")
local w, _ = surface.GetTextSize(text)
surface.SetFont("BeatrunHUD")
surface.SetTextColor(text_color)
surface.SetTextPos(ScrW() * 0.87 - w + vpx, ScrH() * 0.075 + vpz)
surface.DrawText(text)
local text = "REPLAY MODE - MAY BE INACCURATE"
local w, h = surface.GetTextSize(text)
surface.SetTextColor(text_color)
surface.SetTextPos(ScrW() * 0.87 - w + vpx, ScrH() * 0.075 + vpz + h)
surface.DrawText(text) surface.DrawText(text)
end end
@ -354,23 +386,19 @@ function LoadCheckpointTime()
return times or nil return times or nil
end end
-- function SaveReplayData() function SaveReplayData()
-- local replay = util.Compress(util.TableToJSON(LocalPlayer().ReplayTicks)) local replay = util.Compress(util.TableToJSON(LocalPlayer().ReplayTicks))
-- local dir = "beatrun/replays/" .. game.GetMap() .. "/" local dir = "beatrun/replays/" .. game.GetMap() .. "/"
if not replay then return end
-- if not replay then return end file.CreateDir(dir)
file.Write(dir .. Course_ID .. ".txt", replay)
-- file.CreateDir(dir) end
-- file.Write(dir .. Course_ID .. ".txt", replay) function LoadReplayData()
-- end local dir = "beatrun/replays/" .. game.GetMap() .. "/"
local replay = file.Read(dir .. Course_ID .. ".txt")
-- function LoadReplayData() replay = replay and util.JSONToTable(util.Decompress(replay))
-- local dir = "beatrun/replays/" .. game.GetMap() .. "/" return replay or nil
-- local replay = file.Read(dir .. Course_ID .. ".txt") end
-- replay = replay and util.JSONToTable(util.Decompress(replay))
-- return replay or nil
-- end
function StartCourse(spawntime) function StartCourse(spawntime)
local faststartmult = LocalPlayer():GetInfoNum("Beatrun_FastStart", 0) > 0 and 0.5 or 1 local faststartmult = LocalPlayer():GetInfoNum("Beatrun_FastStart", 0) > 0 and 0.5 or 1

View file

@ -785,3 +785,9 @@ hook.Add("SetupMove", "Climbing", function(ply, mv, cmd)
ClimbingThink(ply, mv, cmd) ClimbingThink(ply, mv, cmd)
end end
end) end)
hook.Add("PlayerSwitchWeapon", "NoSwitchForClimbers", function(ply)
if ply:GetClimbing() != 0 then
return true
end
end)

View file

@ -6,8 +6,95 @@ else
end) end)
end end
local momentumshield = CreateConVar("Beatrun_MomentumShield", 0, {FCVAR_REPLICATED, FCVAR_ARCHIVE})
if SERVER then
local healthRegen = CreateConVar("Beatrun_HealthRegen", 1, {FCVAR_REPLICATED, FCVAR_ARCHIVE})
hook.Add("PlayerPostThink", "HealthRegen", function(ply)
if not healthRegen:GetBool() then return end
if not ply.LastHP then
ply.LastHP = ply:Health()
ply.RegenTime = 0
return
end
if ply:Health() < ply.LastHP then
ply.RegenTime = CurTime() + 5
end
if ply:Alive() and ply.RegenTime < CurTime() and ply:Health() < ply:GetMaxHealth() then
ply:SetHealth(math.Approach(ply:Health(), ply:GetMaxHealth(), 1))
ply.RegenTime = CurTime() + 0.05
end
ply.LastHP = ply:Health()
end)
for _,v in ipairs(player.GetAll()) do
v:SetNWFloat("MomentumShieldPer", 0)
end
hook.Add("Move", "MomentumShieldRegen", function(ply, mv)
-- I use the move hook because I need momentum data...blame Garry
--if !momentumshield:GetBool() then return end
local shieldpercent = ply:GetNWFloat("MomentumShieldPer", 0)
if !ply.shielddecaytime then
ply.shielddecaytime = 0
return
end
if ply:GetVelocity():Length2D() > (GetConVar("Beatrun_SpeedLimit"):GetInt() * 0.8181818181818182) then
ply:SetNWFloat("MomentumShieldPer", math.Approach(shieldpercent, 300, FrameTime() * 30))
ply.shielddecaytime = CurTime() + 3
elseif ply.shielddecaytime < CurTime() then
ply:SetNWFloat("MomentumShieldPer", math.Approach(shieldpercent, 0, FrameTime() * 250))
end
--print(shieldpercent)
end)
end
if CLIENT then
local lastmomshield = -1
local shieldlerptime = 0.16
local start, oldshield, newshield = 0, -1, -1
local hudscale = ScrH() / 1080
hook.Add("HUDPaint", "MomentumShieldHUD", function()
local ply = LocalPlayer()
if !IsValid(ply) then return end
local shieldpercent = ply:GetNWFloat("MomentumShieldPer", 0)
if oldshield == -1 and newshield == -1 then
oldshield = shieldpercent
newshield = shieldpercent
end
local shieldsmooth = Lerp((CurTime() - start) / shieldlerptime, oldshield, newshield)
if newshield != shieldpercent then
if shieldsmooth != shieldpercent then
newshield = shieldsmooth
end
oldshield = newshield
start = CurTime()
newshield = shieldpercent
end
surface.SetDrawColor(255,255,255)
surface.DrawRect(ScrW() * 0.5 - 75,ScrH() * 0.6,150 * (math.max(0, shieldsmooth) / 300) * hudscale, 3 * hudscale)
end)
end
hook.Add("ScalePlayerDamage", "MissedMe", function(ply, hitgroup, dmginfo) hook.Add("ScalePlayerDamage", "MissedMe", function(ply, hitgroup, dmginfo)
if IsValid(dmginfo:GetAttacker()) and dmginfo:GetAttacker():IsPlayer() then return end if IsValid(dmginfo:GetAttacker()) and dmginfo:GetAttacker():IsPlayer() or momentumshield:GetBool() then return end
local vel = ply:GetVelocity() local vel = ply:GetVelocity()
local vel_len = vel:Length() local vel_len = vel:Length()
@ -16,13 +103,27 @@ hook.Add("ScalePlayerDamage", "MissedMe", function(ply, hitgroup, dmginfo)
end) end)
hook.Add("EntityTakeDamage", "MissedMe", function(victim, dmginfo) hook.Add("EntityTakeDamage", "MissedMe", function(victim, dmginfo)
if not victim:IsPlayer() then return end if not victim:IsPlayer() or momentumshield:GetBool() then return end
local dmgtype = dmginfo:GetDamageType() local dmgtype = dmginfo:GetDamageType()
if victim:GetSliding() and (dmgtype == DMG_SLASH or dmgtype == DMG_CLUB) then return true end if victim:GetSliding() and (dmgtype == DMG_SLASH or dmgtype == DMG_CLUB) then return true end
end) end)
hook.Add("EntityTakeDamage", "ShieldProtectPlayer", function(ent, dmg)
if !ent:IsPlayer() or !momentumshield:GetBool() then return end
shieldper = ent:GetNWFloat("MomentumShieldPer", 0)
local dmgamount = dmg:GetDamage()
if shieldper > 0 and (shieldper - dmgamount) > 0 then
ent:SetNWFloat("MomentumShieldPer", math.Clamp(shieldper - dmgamount, 0, 300))
dmg:ScaleDamage(0)
elseif shieldper > 0 then
ent:SetNWFloat("MomentumShieldPer", math.Clamp(shieldper - dmgamount, 0, 300))
dmg:SetDamage(shieldper - dmgamount)
end
end)
hook.Add("PlayerShouldTakeDamage", "DBNO", function(ply, attacker) hook.Add("PlayerShouldTakeDamage", "DBNO", function(ply, attacker)
if not IsValid(attacker) then return end if not IsValid(attacker) then return end
@ -57,47 +158,28 @@ if CLIENT then
local radial = Material("radial.png") local radial = Material("radial.png")
local dmgalpha = 0 local dmgalpha = 0
hook.Add("HUDPaint", "NTScreenEffects", function() hook.Add("PreDrawHUD", "NTScreenEffects", function()
local ply = LocalPlayer() -- Draw the overlay this way or we (sort of) break other HUDs.
cam.Start2D()
local ply = LocalPlayer()
if not ply:Alive() then return end if not ply:Alive() then
cam.End2D()
return
end
local w = ScrW() local w = ScrW()
local h = ScrH() local h = ScrH()
dmgalpha = math.min(300 * math.abs(ply:Health() / ply:GetMaxHealth() - 1), 255) curhealth = math.Clamp(ply:Health(), 0, ply:GetMaxHealth())
dmgalpha = math.min(300 * math.abs(curhealth / ply:GetMaxHealth() - 1), 255)
surface.SetMaterial(radial) surface.SetMaterial(radial)
surface.SetDrawColor(0, 0, 0, dmgalpha * 0.85) surface.SetDrawColor(0, 0, 0, dmgalpha * 0.58)
surface.DrawTexturedRect(0, 0, ScrW(), ScrH()) surface.DrawTexturedRect(0, 0, ScrW(), ScrH())
surface.DrawTexturedRectRotated(ScrW() * 0.5, ScrH() * 0.5, ScrW(), ScrH(), 180) surface.DrawTexturedRectRotated(ScrW() * 0.5, ScrH() * 0.5, ScrW(), ScrH(), 180)
surface.SetDrawColor(255, 25, 25, dmgalpha * math.max(0, math.sin(CurTime() * 6) * 0.045)) surface.SetDrawColor(255, 25, 25, dmgalpha * math.max(0, math.sin(CurTime() * 6) * 0.09))
surface.DrawTexturedRect(0, 0, w, h) surface.DrawTexturedRect(0, 0, w, h)
end) cam.End2D()
end
if SERVER then
local healthRegen = CreateConVar("Beatrun_HealthRegen", 1, {FCVAR_REPLICATED, FCVAR_ARCHIVE})
hook.Add("PlayerPostThink", "HealthRegen", function(ply)
if not healthRegen:GetBool() then return end
if not ply.LastHP then
ply.LastHP = ply:Health()
ply.RegenTime = 0
return
end
if ply:Health() < ply.LastHP then
ply.RegenTime = CurTime() + 5
end
if ply:Alive() and ply.RegenTime < CurTime() and ply:Health() < ply:GetMaxHealth() then
ply:SetHealth(math.Approach(ply:Health(), ply:GetMaxHealth(), 1))
ply.RegenTime = CurTime() + 0.05
end
ply.LastHP = ply:Health()
end) end)
end end

View file

@ -22,26 +22,7 @@ if SERVER then
v:Spawn() v:Spawn()
end end
if GetConVar("Beatrun_RandomMWLoadouts"):GetBool() then Beatrun_GiveGMWeapon(v)
for i = 0, 1 do
local randomSWEP = getRandomMGBaseWeapon()
local w = v:Give(randomSWEP.ClassName)
timer.Simple(1, function()
if w:GetPrimaryAmmoType() ~= -1 then v:GiveAmmo(10000, w:GetPrimaryAmmoType(), true) end
if w:GetSecondaryAmmoType() ~= -1 then v:GiveAmmo(5, w:GetSecondaryAmmoType(), true) end
end)
end
else
for _, b in ipairs(BEATRUN_GAMEMODES_LOADOUTS[math.random(#BEATRUN_GAMEMODES_LOADOUTS)]) do
local w = v:Give(b)
timer.Simple(1, function()
if w:GetPrimaryAmmoType() ~= -1 then v:GiveAmmo(10000, w:GetPrimaryAmmoType(), true) end
if w:GetSecondaryAmmoType() ~= -1 then v:GiveAmmo(5, w:GetSecondaryAmmoType(), true) end
end)
end
end
end end
end end

View file

@ -2,20 +2,6 @@ if SERVER then
util.AddNetworkString("Deathmatch_Start") util.AddNetworkString("Deathmatch_Start")
util.AddNetworkString("Deathmatch_Sync") util.AddNetworkString("Deathmatch_Sync")
CreateConVar("Beatrun_RandomMWLoadouts", 0, {FCVAR_REPLICATED, FCVAR_ARCHIVE})
function getRandomMGBaseWeapon()
local allWep = weapons.GetList()
local wepIndex = math.random(#allWep)
local wep = allWep[wepIndex]
if wep.Base == "mg_base" and not wep.AdminOnly then
return wep
else
return getRandomMGBaseWeapon()
end
end
function Beatrun_StartDeathmatch() function Beatrun_StartDeathmatch()
if GetGlobalBool("GM_DEATHMATCH") then return end if GetGlobalBool("GM_DEATHMATCH") then return end
if Course_Name ~= "" then return end if Course_Name ~= "" then return end
@ -31,26 +17,7 @@ if SERVER then
v:Spawn() v:Spawn()
end end
if GetConVar("Beatrun_RandomMWLoadouts"):GetBool() then Beatrun_GiveGMWeapon(v)
for i = 0, 1 do
local randomSWEP = getRandomMGBaseWeapon()
local w = v:Give(randomSWEP.ClassName)
timer.Simple(1, function()
if w:GetPrimaryAmmoType() ~= -1 then v:GiveAmmo(10000, w:GetPrimaryAmmoType(), true) end
if w:GetSecondaryAmmoType() ~= -1 then v:GiveAmmo(5, w:GetSecondaryAmmoType(), true) end
end)
end
else
for _, b in ipairs(BEATRUN_GAMEMODES_LOADOUTS[math.random(#BEATRUN_GAMEMODES_LOADOUTS)]) do
local w = v:Give(b)
timer.Simple(1, function()
if w:GetPrimaryAmmoType() ~= -1 then v:GiveAmmo(10000, w:GetPrimaryAmmoType(), true) end
if w:GetSecondaryAmmoType() ~= -1 then v:GiveAmmo(5, w:GetSecondaryAmmoType(), true) end
end)
end
end
end end
end end

View file

@ -1,6 +1,8 @@
local quakejump = CreateConVar("Beatrun_QuakeJump", 1, {FCVAR_REPLICATED, FCVAR_ARCHIVE}) local quakejump = CreateConVar("Beatrun_QuakeJump", 1, {FCVAR_REPLICATED, FCVAR_ARCHIVE})
local sidestep = CreateConVar("Beatrun_SideStep", 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}) 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 function Hardland(jt)
local ply = LocalPlayer() local ply = LocalPlayer()
@ -308,6 +310,14 @@ hook.Add("SetupMove", "MESetupMove", function(ply, mv, cmd)
activewep:SetSideStep(true) activewep:SetSideStep(true)
mv:SetVelocity(cmd:GetViewAngles():Right() * -(speed_limit:GetInt() * 1.8)) 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)) ply:ViewPunch(Angle(-3, 0, -4.5))
@ -323,6 +333,14 @@ hook.Add("SetupMove", "MESetupMove", function(ply, mv, cmd)
activewep:SetSideStep(true) activewep:SetSideStep(true)
mv:SetVelocity(cmd:GetViewAngles():Right() * (speed_limit:GetInt() * 1.8)) 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)) ply:ViewPunch(Angle(-3, 0, 4.5))
@ -424,3 +442,14 @@ if CLIENT then
LocalPlayer():CLViewPunch(Angle(1.5, -0.75, 0)) LocalPlayer():CLViewPunch(Angle(1.5, -0.75, 0))
end) end)
end end
if SERVER then
concommand.Add(
"Beatrun_ResetFriction",
function()
for _, ply in ipairs(player.GetAll()) do
ply:SetFriction(1)
end
end
)
end

View file

@ -17,7 +17,10 @@ end
local function LadderCheck(ply, mv, cmd, ladder) local function LadderCheck(ply, mv, cmd, ladder)
local ladderang = ladder:GetAngles() local ladderang = ladder:GetAngles()
if math.abs(math.AngleDifference(cmd:GetViewAngles().y, ladderang.y - 180)) > 30 then return false end if math.abs(math.AngleDifference(cmd:GetViewAngles().y, ladderang.y - 180)) > 30 then
print("kill me already")
return false
end
local zlevel = mv:GetOrigin().z local zlevel = mv:GetOrigin().z
local newpos = ladder:GetPos() + ladderang:Forward() * 19 local newpos = ladder:GetPos() + ladderang:Forward() * 19
@ -83,6 +86,18 @@ local function LadderThink(ply, mv, cmd, ladder)
cmd:ClearMovement() cmd:ClearMovement()
local tr = ply.LadderTrace
tr.output = ply.LadderTraceOut
tr.start = mv:GetOrigin() + Vector(0, 0, 64)
tr.endpos = tr.start + cmd:GetViewAngles():Forward() * 100
tr.filter = ply
util.TraceLine(tr)
local eyetr = ply.LadderTraceOut
local eyetrentity = eyetr.Entity
local fraction = eyetr.Fraction
if ply:GetLadderEntering() then if ply:GetLadderEntering() then
local lerprate = 2 local lerprate = 2
@ -103,7 +118,7 @@ local function LadderThink(ply, mv, cmd, ladder)
return return
end end
if mv:KeyDown(IN_FORWARD) and ply:GetLadderDelay() < CurTime() and ply:GetLadderHeight() < ladder:GetLadderHeight() then if mv:KeyDown(IN_FORWARD) and ply:GetLadderDelay() < CurTime() and ply:GetLadderHeight() < ladder:GetLadderHeight() and (fraction or 1) <= 0.35 then
local pos = mv:GetOrigin() local pos = mv:GetOrigin()
ply:SetLadderDelay(CurTime() + 0.35) ply:SetLadderDelay(CurTime() + 0.35)
@ -245,6 +260,43 @@ local function LadderThink(ply, mv, cmd, ladder)
return return
end end
if mv:KeyDown(IN_JUMP) and mv:KeyDown(IN_FORWARD) and !((fraction or 1) <= 0.35) then
local ladderangf = ladder:GetAngles():Forward()
local newpos = mv:GetOrigin()
local facing = {
pos = math.Round(ladderangf.x) == 1 and "x" or math.Round(ladderangf.x) == -1 and "x" or math.Round(ladderangf.y) == 1 and "y" or math.Round(ladderangf.y) == -1 and "y",
num = math.Round(ladderangf.x) == 1 and 40 or math.Round(ladderangf.x) == -1 and -40 or math.Round(ladderangf.y) == 1 and 40 or math.Round(ladderangf.y) == -1 and -40,
}
local forward = ply:EyeAngles()
forward.p = 0
forward = forward:Forward()
newpos[facing.pos] = mv:GetOrigin()[facing.pos] + facing.num
vel = vector_origin
vel = vel + forward * (6 / 0.06858125)
--print("--")
--print(vel)
vel.z = 300
mv:SetOrigin(newpos)
mv:SetVelocity(vel)
print(CurTime())
if CLIENT and IsFirstTimePredicted() then
BodyAnim:SetSequence("jumpfast")
elseif game.SinglePlayer() then
ply:SendLua("BodyAnim:SetSequence('jumpfast')")
end
ply:SetMoveType(MOVETYPE_WALK)
ply:SetLadder(nil)
--mv:SetVelocity(vector_origin + forward * (6 / 0.06858125))
return
end
mv:SetVelocity(vector_origin) mv:SetVelocity(vector_origin)
mv:SetButtons(0) mv:SetButtons(0)
end end
@ -311,3 +363,14 @@ function CreateLadder(pos, angy, mul)
return ladder return ladder
end end
end end
if CLIENT then
preladderwep = ""
hook.Add("HUDPaint", "NoGunsOnLadders", function()
if !LocalPlayer():Alive() then return end
if LocalPlayer():GetActiveWeapon():GetClass() != "runnerhands" and IsValid(LocalPlayer():GetLadder()) then -- :troll:
preladderwep = LocalPlayer():GetActiveWeapon():GetClass()
input.SelectWeapon(LocalPlayer():GetWeapon("runnerhands"))
end
end)
end

View file

@ -279,6 +279,9 @@ hook.Add("SetupMove", "Melee", function(ply, mv, cmd)
mv:SetVelocity(vel) mv:SetVelocity(vel)
elseif kickglitch:GetBool() and not old_kickglitch:GetBool() then elseif kickglitch:GetBool() and not old_kickglitch:GetBool() then
if SERVER then if SERVER then
local oldfriction = ply:GetFriction()
ply:SetFriction(0)
local platform = ents.Create("prop_physics") local platform = ents.Create("prop_physics")
local pos = ply:GetPos() local pos = ply:GetPos()
@ -293,7 +296,12 @@ hook.Add("SetupMove", "Melee", function(ply, mv, cmd)
local phys = platform:GetPhysicsObject() local phys = platform:GetPhysicsObject()
phys:EnableMotion(false) 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 end
ParkourEvent("jumpslow", ply) ParkourEvent("jumpslow", ply)
@ -313,3 +321,29 @@ hook.Add("SetupMove", "Melee", function(ply, mv, cmd)
MeleeThink(ply, mv, cmd) MeleeThink(ply, mv, cmd)
end 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")

View file

@ -94,10 +94,10 @@ net.Receive("RollAnimSP", function()
roll.BodyAnimSpeed = 1.15 roll.BodyAnimSpeed = 1.15
end end
if GetConVar("Beatrun_OldAnims"):GetBool() then if UseOldAnims:GetBool() then
roll.animmodelstring = "old_climbanim" roll.animmodelstring = "meclimbanim"
else else
roll.animmodelstring = "new_climbanim" roll.animmodelstring = "climbanim"
end end
CacheBodyAnim() CacheBodyAnim()
@ -138,10 +138,10 @@ hook.Add("SetupMove", "EvadeRoll", function(ply, mv, cmd)
end end
if CLIENT and IsFirstTimePredicted() then if CLIENT and IsFirstTimePredicted() then
if GetConVar("Beatrun_OldAnims"):GetBool() then if UseOldAnims:GetBool() then
roll.animmodelstring = "old_climbanim" roll.animmodelstring = "meclimbanim"
else else
roll.animmodelstring = "new_climbanim" roll.animmodelstring = "climbanim"
end end
CacheBodyAnim() CacheBodyAnim()
@ -214,12 +214,11 @@ hook.Add("OnPlayerHitGround", "SafetyRoll", function(ply, water, floater, speed)
end end
if CLIENT and IsFirstTimePredicted() then if CLIENT and IsFirstTimePredicted() then
if GetConVar("Beatrun_OldAnims"):GetBool() then if UseOldAnims:GetBool() then
roll.animmodelstring = "old_climbanim" roll.animmodelstring = "meclimbanim"
else else
roll.animmodelstring = "new_climbanim" roll.animmodelstring = "climbanim"
end end
CacheBodyAnim() CacheBodyAnim()
RemoveBodyAnim() RemoveBodyAnim()
StartBodyAnim(roll) StartBodyAnim(roll)
@ -250,7 +249,7 @@ if SERVER then
if speed < 800 and CurTime() < ply:GetSafetyRollKeyTime() and not ply:GetCrouchJump() and not ply:Crouching() then if speed < 800 and CurTime() < ply:GetSafetyRollKeyTime() and not ply:GetCrouchJump() and not ply:Crouching() then
return 0 return 0
else else
return 1000 return math.huge
end end
end end

View file

@ -246,6 +246,7 @@ end
hook.Add("SetupMove", "qslide", function(ply, mv, cmd) hook.Add("SetupMove", "qslide", function(ply, mv, cmd)
if not ply:Alive() then return end if not ply:Alive() then return end
if ply:GetSafetyRollKeyTime() > CurTime() then return end
if not ply.OldDuckSpeed then if not ply.OldDuckSpeed then
ply.OldDuckSpeed = ply:GetDuckSpeed() ply.OldDuckSpeed = ply:GetDuckSpeed()

View file

@ -20,39 +20,42 @@ local function SwingbarCheck(ply, mv, cmd)
util.TraceHull(tr) util.TraceHull(tr)
if IsValid(trout.Entity) and trout.Entity:GetClass() == "br_swingbar" and (ply:GetSwingbarLast() ~= trout.Entity or ply:GetSBDelay() < CurTime()) then if IsValid(trout.Entity) and trout.Entity:GetClass() == "br_swingbar" and (ply:GetSwingbarLast() ~= trout.Entity or ply:GetSBDelay() < CurTime()) then
local swingbar = trout.Entity if CrueltyParkour:GetBool() and !ply:UsingRH() then
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)
else else
ply:SetSBOffsetSpeed(0) local swingbar = trout.Entity
end 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 if math.abs(dot) < 0.7 then return end
ply:EmitSound("Handsteps.ConcreteHard")
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 end
end end
@ -137,7 +140,7 @@ local function SwingbarThink(ply, mv, cmd)
offset = ply:GetSBOffset() 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
ParkourEvent("swingjump", ply) ParkourEvent("swingjump", ply)
if mv:KeyPressed(IN_JUMP) and offset > 90 then if mv:KeyPressed(IN_JUMP) and offset > 90 then

View file

@ -775,3 +775,11 @@ hook.Add("SetupMove", "BeatrunVaulting", function(ply, mv, cmd)
end end
end 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)

View file

@ -78,6 +78,10 @@ local function WallrunningThink(ply, mv, cmd)
mv:SetButtons(mv:GetButtons() - IN_DUCK) mv:SetButtons(mv:GetButtons() - IN_DUCK)
end 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() local wrtimeremains = CurTime() < ply:GetWallrunTime()
if PuristWallrun:GetBool() then if PuristWallrun:GetBool() then
@ -522,12 +526,15 @@ end
local vecdir = Vector(1000, 1000, 1000) local vecdir = Vector(1000, 1000, 1000)
hook.Add("SetupMove", "Wallrunning", function(ply, mv, cmd) 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) ply:SetWallrun(0)
end 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 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 end
if ply:GetWallrun() ~= 0 then if ply:GetWallrun() ~= 0 then

View file

@ -138,7 +138,7 @@ local function ZiplineThink(ply, mv, cmd, zipline)
dir:Mul(-1) dir:Mul(-1)
end 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:SetZipline(nil)
ply:SetMoveType(MOVETYPE_WALK) ply:SetMoveType(MOVETYPE_WALK)

View file

@ -1,4 +1,4 @@
VERSION_GLOBAL = "1.0.14" VERSION_GLOBAL = "1.0.22"
VERSION_LATEST = "" VERSION_LATEST = ""
VERSION_CHECKED = false VERSION_CHECKED = false
@ -11,6 +11,8 @@ GM.Website = "github.com/JonnyBro/beatrun"
include("player_class/player_beatrun.lua") include("player_class/player_beatrun.lua")
include("preexecute/shared.lua")
for _, v in ipairs(file.Find("gamemodes/beatrun/gamemode/sh/*.lua", "GAME", "nameasc")) do for _, v in ipairs(file.Find("gamemodes/beatrun/gamemode/sh/*.lua", "GAME", "nameasc")) do
AddCSLuaFile("sh/" .. v) AddCSLuaFile("sh/" .. v)
include("sh/" .. v) include("sh/" .. v)

View 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.

View file

@ -1 +1 @@
1.0.14 1.0.22