Add GameAssembly detection before AOB scan and applying fixes
This commit is contained in:
@@ -31,6 +31,7 @@ static uint8_t* FOVaddress = nullptr;
|
|||||||
static uint8_t* UltraWideaddress = nullptr;
|
static uint8_t* UltraWideaddress = nullptr;
|
||||||
static uint8_t* Resolutionaddress = nullptr;
|
static uint8_t* Resolutionaddress = nullptr;
|
||||||
static uint8_t* pluginDLLModule = nullptr;
|
static uint8_t* pluginDLLModule = nullptr;
|
||||||
|
static uint8_t* GameAssemblyDLLModule = nullptr;
|
||||||
// Hooking
|
// Hooking
|
||||||
static SafetyHookMid FOVHook{};
|
static SafetyHookMid FOVHook{};
|
||||||
static SafetyHookMid UWHook{};
|
static SafetyHookMid UWHook{};
|
||||||
@@ -88,6 +89,18 @@ extern "C" __declspec(dllexport) void InitializeCore() {
|
|||||||
logger->info("Core ready.");
|
logger->info("Core ready.");
|
||||||
}
|
}
|
||||||
}).detach();
|
}).detach();
|
||||||
|
std::thread([]() {
|
||||||
|
HMODULE hModule = nullptr;
|
||||||
|
for (int i = 0; i < 100; ++i) { // gives 10 seconds to find Unity GameAssembly.dll
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||||
|
hModule = GetModuleHandleA("GameAssembly.dll");
|
||||||
|
if (hModule) break;
|
||||||
|
}
|
||||||
|
if (hModule) {
|
||||||
|
GameAssemblyDLLModule = reinterpret_cast<uint8_t*>(hModule);
|
||||||
|
logger->debug("GameAssembly loaded @ {}", (void*)GameAssemblyDLLModule);
|
||||||
|
}
|
||||||
|
}).detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setters for Reshade addon call
|
// Setters for Reshade addon call
|
||||||
|
|||||||
Reference in New Issue
Block a user