[AntiCheat] Disable protection during unit tests
This commit is contained in:
parent
8c4ca6e4da
commit
d7c26d6dea
@ -181,7 +181,7 @@ namespace Components
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Loader::IsPerformingUnitTests()
|
bool inline Loader::IsPerformingUnitTests()
|
||||||
{
|
{
|
||||||
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
|
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
|
||||||
return Flags::HasFlag("tests");
|
return Flags::HasFlag("tests");
|
||||||
|
@ -60,7 +60,7 @@ BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD ul_reason_for_call, LPVOID /*l
|
|||||||
#ifndef DISABLE_ANTICHEAT
|
#ifndef DISABLE_ANTICHEAT
|
||||||
[]()
|
[]()
|
||||||
{
|
{
|
||||||
if (!Components::Dedicated::IsEnabled())
|
if (!Components::Dedicated::IsEnabled() && !Components::Loader::IsPerformingUnitTests())
|
||||||
{
|
{
|
||||||
Components::AntiCheat::ProtectProcess();
|
Components::AntiCheat::ProtectProcess();
|
||||||
Components::AntiCheat::PatchThreadCreation();
|
Components::AntiCheat::PatchThreadCreation();
|
||||||
@ -84,7 +84,7 @@ BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD ul_reason_for_call, LPVOID /*l
|
|||||||
#ifndef DISABLE_ANTICHEAT
|
#ifndef DISABLE_ANTICHEAT
|
||||||
[]()
|
[]()
|
||||||
{
|
{
|
||||||
if (!Components::Dedicated::IsEnabled())
|
if (!Components::Dedicated::IsEnabled() && !Components::Loader::IsPerformingUnitTests())
|
||||||
{
|
{
|
||||||
Components::AntiCheat::VerifyThreadIntegrity();
|
Components::AntiCheat::VerifyThreadIntegrity();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user