From 1112eba7fa2a25007a97cbda6757cf634fb24179 Mon Sep 17 00:00:00 2001 From: FutureRave Date: Sun, 7 Nov 2021 11:09:00 +0000 Subject: [PATCH] Add customizable speed scale for stance --- src/Components/Loader.cpp | 1 + src/Components/Loader.hpp | 1 + src/Components/Modules/Dvar.cpp | 3 +++ src/Game/Structs.hpp | 31 +++++++++++++++++++++++++++++++ 4 files changed, 36 insertions(+) diff --git a/src/Components/Loader.cpp b/src/Components/Loader.cpp index 7b76cb02..fea7625e 100644 --- a/src/Components/Loader.cpp +++ b/src/Components/Loader.cpp @@ -104,6 +104,7 @@ namespace Components Loader::Register(new Gamepad()); Loader::Register(new Chat()); Loader::Register(new TextRenderer()); + Loader::Register(new Movement()); Loader::Register(new Client()); diff --git a/src/Components/Loader.hpp b/src/Components/Loader.hpp index 2265b729..dd948b09 100644 --- a/src/Components/Loader.hpp +++ b/src/Components/Loader.hpp @@ -132,6 +132,7 @@ namespace Components #include "Modules/SoundMutexFix.hpp" #include "Modules/Chat.hpp" #include "Modules/TextRenderer.hpp" +#include "Modules/Movement.hpp" #include "Modules/Gamepad.hpp" #include "Modules/Client.hpp" diff --git a/src/Components/Modules/Dvar.cpp b/src/Components/Modules/Dvar.cpp index d0892d2e..24149280 100644 --- a/src/Components/Modules/Dvar.cpp +++ b/src/Components/Modules/Dvar.cpp @@ -299,6 +299,9 @@ namespace Components // Uncheat ui_debugMode Utils::Hook::Xor(0x6312DE, Game::dvar_flag::DVAR_FLAG_CHEAT); + // Remove unknown flag (to prevent unknown behaviour) + Utils::Hook::Xor(0x448B42, Game::dvar_flag::DVAR_FLAG_UNKNOWN80); + // Hook dvar 'name' registration Utils::Hook(0x40531C, Dvar::RegisterName, HOOK_CALL).install()->quick(); diff --git a/src/Game/Structs.hpp b/src/Game/Structs.hpp index 7be1e8d7..1a9c019c 100644 --- a/src/Game/Structs.hpp +++ b/src/Game/Structs.hpp @@ -6876,6 +6876,37 @@ namespace Game const char* args[9]; }; + struct pmove_s + { + playerState_s* ps; + usercmd_s cmd; + usercmd_s oldcmd; + int tracemask; + int numtouch; + int touchents[32]; + char __pad0[24]; + float xyspeed; + int proneChange; + float maxSprintTimeMultiplier; + bool mantleStarted; + float mantleEndPos[3]; + int mantleDuration; + int viewChangeTime; + float viewChange; + float fTorsoPitch; + float fWaistPitch; + unsigned char handler; + }; + + enum EffectiveStance + { + PM_EFF_STANCE_DEFAULT = 0, + PM_EFF_STANCE_PRONE = 1, + PM_EFF_STANCE_DUCKED = 2, + PM_EFF_STANCE_LASTSTANDCRAWL = 3, + PM_EFF_STANCE_COUNT = 4 + }; + #pragma endregion #ifndef IDA