Rewrote some stuff to make it more clearer

This commit is contained in:
Unknown 2024-04-20 15:04:09 +02:00
parent db2282b7a2
commit 232e5c2bd6
3 changed files with 5 additions and 3 deletions

View File

@ -170,7 +170,7 @@ namespace Cheat {
CWINGui::Font = SDK::UObject::FindObject<SDK::UFont>("Font Roboto.Roboto");
StaticConstructObject_Internal = (fStaticConstructObject_Internal)((uintptr_t)GetModuleHandle(0) + 0x1359C70);
StaticConstructObject_Internal = (fStaticConstructObject_Internal)((uintptr_t)GetModuleHandle(0) + Offsets::StaticConstructObject_Internal);
Initialized = true;

View File

@ -30,6 +30,8 @@ namespace Offsets
constexpr int32 GNames = 0x00000000;
constexpr int32 ProcessEvent = 0x013522E0;
constexpr int32 ProcessEventIdx = 0x00000044;
constexpr int32 PostRenderIdx = 0x00000064;
constexpr int32 StaticConstructObject_Internal = 0x1359C70;
}
#include "PropertyFixup.hpp"

View File

@ -899,7 +899,7 @@ void MainRender(SDK::UObject* object, SDK::UCanvas* Canvas) {
auto ViewportClient = LocalPlayer->ViewportClient;
auto vTable = *(void***)(ViewportClient);
auto vTableWorld = *(void***)(World);
Functions::ChangePointer((uintptr_t)vTable, 100, (uintptr_t)origin_renderer);
Functions::ChangePointer((uintptr_t)vTable, Offsets::PostRenderIdx, (uintptr_t)origin_renderer);
MH_DisableHook(MH_ALL_HOOKS);
@ -938,7 +938,7 @@ void MainThread() {
auto vTable = *(void***)(ViewportClient);
auto vTableWorld = *(void***)(World);
origin_renderer = (PostRender_t)Functions::ChangePointer((uintptr_t)vTable, 100, (uintptr_t)MainRender);
origin_renderer = (PostRender_t)Functions::ChangePointer((uintptr_t)vTable, Offsets::PostRenderIdx, (uintptr_t)MainRender);
//fnProcessEventOrigin = (fnProcessEvent)Functions::ChangePointer((uintptr_t)vTableWorld, Offsets::ProcessEventIdx, (uintptr_t)ProcessEventHook);
MH_Initialize();