diff --git a/EscapeTheBackroomsGUiTest/Cheat.h b/EscapeTheBackroomsGUiTest/Cheat.h index 2c4e808..91c0977 100644 --- a/EscapeTheBackroomsGUiTest/Cheat.h +++ b/EscapeTheBackroomsGUiTest/Cheat.h @@ -170,7 +170,7 @@ namespace Cheat { CWINGui::Font = SDK::UObject::FindObject("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; diff --git a/EscapeTheBackroomsGUiTest/SDK/SDK.hpp b/EscapeTheBackroomsGUiTest/SDK/SDK.hpp index b017cd0..3e3f4ed 100644 --- a/EscapeTheBackroomsGUiTest/SDK/SDK.hpp +++ b/EscapeTheBackroomsGUiTest/SDK/SDK.hpp @@ -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" diff --git a/EscapeTheBackroomsGUiTest/dllmain.cpp b/EscapeTheBackroomsGUiTest/dllmain.cpp index 458f371..2a4925f 100644 --- a/EscapeTheBackroomsGUiTest/dllmain.cpp +++ b/EscapeTheBackroomsGUiTest/dllmain.cpp @@ -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();