[AntiCheat] Use simpler compiler expression
This commit is contained in:
parent
a47b0f2aaa
commit
47c8fcc644
@ -3,6 +3,8 @@
|
||||
#ifndef DEBUG
|
||||
// Hide AntiCheat in embeded symbol names
|
||||
#define AntiCheat SubComponent
|
||||
#else
|
||||
#define DISABLE_ANTICHEAT
|
||||
#endif
|
||||
|
||||
// Uncomment to enable process protection (conflicts with steam!)
|
||||
|
@ -56,7 +56,7 @@ namespace Components
|
||||
// Changelog
|
||||
UIFeeder::Add(62.0f, Changelog::GetChangelogCount, Changelog::GetChangelogText, Changelog::SelectChangelog);
|
||||
|
||||
#if !defined(DEBUG) && !defined(DISABLE_ANTICHEAT)
|
||||
#ifndef DISABLE_ANTICHEAT
|
||||
Scheduler::OnFrame(AntiCheat::QuickCodeScanner1);
|
||||
#endif
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ namespace Components
|
||||
|
||||
// This is placed here in case the anticheat has been disabled!
|
||||
// Make sure this is called after the memory scan!
|
||||
#if !defined(DEBUG) && !defined(DISABLE_ANTICHEAT)
|
||||
#ifndef DISABLE_ANTICHEAT
|
||||
Utils::Hook(0x5ACB9E, []() // Somewhere in the renderer, past the scan check
|
||||
{
|
||||
AntiCheat::ScanIntegrityCheck();
|
||||
|
@ -101,7 +101,7 @@ namespace Components
|
||||
|
||||
// This is placed here in case the anticheat has been disabled!
|
||||
// Make sure this is called after every onther anticheat check!
|
||||
#if !defined(DEBUG) && !defined(DISABLE_ANTICHEAT)
|
||||
#ifndef DISABLE_ANTICHEAT
|
||||
Utils::Hook(0x5ACBA3, []() // Somewhere in the renderer, past other renderer hooks!
|
||||
{
|
||||
AntiCheat::FlagIntegrityCheck();
|
||||
|
@ -286,7 +286,7 @@ namespace Components
|
||||
}
|
||||
});
|
||||
|
||||
// #if !defined(DEBUG) && !defined(DISABLE_ANTICHEAT)
|
||||
// #ifndef DISABLE_ANTICHEAT
|
||||
// if (!Dedicated::IsEnabled() && !ZoneBuilder::IsEnabled() && !Utils::IsWineEnvironment() && !Loader::PerformingUnitTests())
|
||||
// {
|
||||
// AntiCheat::PatchVirtualProtect(VirtualProtect, VirtualProtectEx);
|
||||
|
@ -766,7 +766,7 @@ namespace Components
|
||||
}
|
||||
});
|
||||
|
||||
#if !defined(DEBUG) && !defined(DISABLE_ANTICHEAT)
|
||||
#ifndef DISABLE_ANTICHEAT
|
||||
Scheduler::OnFrame(AntiCheat::QuickCodeScanner2);
|
||||
#endif
|
||||
|
||||
|
@ -855,7 +855,7 @@ namespace Components
|
||||
Scheduler::OnFrame(ServerList::Frame);
|
||||
|
||||
// This is placed here in case the anticheat has been disabled!
|
||||
#if !defined(DEBUG) && !defined(DISABLE_ANTICHEAT) && defined(PROCTECT_PROCESS)
|
||||
#if !defined(DISABLE_ANTICHEAT) && defined(PROCTECT_PROCESS)
|
||||
Scheduler::OnFrame(AntiCheat::ReadIntegrityCheck, true);
|
||||
#endif
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD ul_reason_for_call, LPVOID /*l
|
||||
// Ensure we're working with our desired binary
|
||||
if (Utils::Hook::Get<DWORD>(0x4C0FFF) != 0x6824748B) return FALSE;
|
||||
|
||||
#if !defined(DEBUG) && !defined(DISABLE_ANTICHEAT)
|
||||
#ifndef DISABLE_ANTICHEAT
|
||||
[]()
|
||||
{
|
||||
Components::AntiCheat::ProtectProcess();
|
||||
@ -90,7 +90,7 @@ BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD ul_reason_for_call, LPVOID /*l
|
||||
}
|
||||
else if(ul_reason_for_call == DLL_THREAD_ATTACH)
|
||||
{
|
||||
#if !defined(DEBUG) && !defined(DISABLE_ANTICHEAT)
|
||||
#ifndef DISABLE_ANTICHEAT
|
||||
[]()
|
||||
{
|
||||
Components::AntiCheat::VerifyThreadIntegrity();
|
||||
|
Loading…
Reference in New Issue
Block a user