diff --git a/src/Components/Modules/Dvar.cpp b/src/Components/Modules/Dvar.cpp index 9bdd9f5d..4814f817 100644 --- a/src/Components/Modules/Dvar.cpp +++ b/src/Components/Modules/Dvar.cpp @@ -172,8 +172,14 @@ namespace Components // un-cheat cg_fov and add archive flags Utils::Hook::Xor(0x4F8E35, Game::dvar_flag::DVAR_FLAG_CHEAT | Game::dvar_flag::DVAR_FLAG_SAVED); - // set flags of cg_drawFPS to archive - Utils::Hook::Or(0x4F8F69, Game::dvar_flag::DVAR_FLAG_SAVED); + // un-cheat cg_debugInfoCornerOffset and add archive flags + Utils::Hook::Xor(0x4F8FC2, Game::dvar_flag::DVAR_FLAG_CHEAT | Game::dvar_flag::DVAR_FLAG_SAVED); + + // remove archive flags for cg_hudchatposition + Utils::Hook::Xor(0x4F9992, Game::dvar_flag::DVAR_FLAG_SAVED); + + // remove write protection from fs_game + Utils::Hook::Xor(0x6431EA, Game::dvar_flag::DVAR_FLAG_WRITEPROTECTED); // set cg_fov max to 90.0 static float cgFov90 = 90.0f; diff --git a/src/Utils/Hooking.hpp b/src/Utils/Hooking.hpp index 1882de71..37e74a85 100644 --- a/src/Utils/Hooking.hpp +++ b/src/Utils/Hooking.hpp @@ -12,6 +12,7 @@ namespace Utils Hook(void* place, void* stub, bool useJump = true) : Hook() { Hook::Initialize(place, stub, useJump); } Hook(DWORD place, void* stub, bool useJump = true) : Hook((void*)place, stub, useJump) {} Hook(DWORD place, DWORD stub, bool useJump = true) : Hook((void*)place, (void*)stub, useJump) {} + Hook(DWORD place, void(*stub)(), bool useJump = true) : Hook((void*)place, (void*)stub, useJump) {} ~Hook();