diff --git a/src/Components/Loader.cpp b/src/Components/Loader.cpp index 6000beba..b2f69a35 100644 --- a/src/Components/Loader.cpp +++ b/src/Components/Loader.cpp @@ -181,7 +181,7 @@ namespace Components return result; } - bool Loader::IsPerformingUnitTests() + bool inline Loader::IsPerformingUnitTests() { #if defined(DEBUG) || defined(FORCE_UNIT_TESTS) return Flags::HasFlag("tests"); diff --git a/src/Main.cpp b/src/Main.cpp index 0bbfd104..08919017 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -60,7 +60,7 @@ BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD ul_reason_for_call, LPVOID /*l #ifndef DISABLE_ANTICHEAT []() { - if (!Components::Dedicated::IsEnabled()) + if (!Components::Dedicated::IsEnabled() && !Components::Loader::IsPerformingUnitTests()) { Components::AntiCheat::ProtectProcess(); Components::AntiCheat::PatchThreadCreation(); @@ -84,7 +84,7 @@ BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD ul_reason_for_call, LPVOID /*l #ifndef DISABLE_ANTICHEAT []() { - if (!Components::Dedicated::IsEnabled()) + if (!Components::Dedicated::IsEnabled() && !Components::Loader::IsPerformingUnitTests()) { Components::AntiCheat::VerifyThreadIntegrity(); }