From 07746095b7cb6e678fc6e08bdfada7cba06f0117 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Thu, 26 Jan 2017 20:41:39 +0100 Subject: [PATCH] [AntiCheat] Disable process protection as it conflicts with steam --- src/Components/Modules/AntiCheat.cpp | 6 ++++++ src/Components/Modules/AntiCheat.hpp | 6 ++++++ src/Components/Modules/ServerList.cpp | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Components/Modules/AntiCheat.cpp b/src/Components/Modules/AntiCheat.cpp index 5fccbfd0..0d4c7bb9 100644 --- a/src/Components/Modules/AntiCheat.cpp +++ b/src/Components/Modules/AntiCheat.cpp @@ -99,6 +99,7 @@ namespace Components void AntiCheat::ReadIntegrityCheck() { +#ifdef PROCTECT_PROCESS static Utils::Time::Interval check; if(check.elapsed(20s)) @@ -118,6 +119,7 @@ namespace Components // Set the integrity flag AntiCheat::Flags |= AntiCheat::IntergrityFlag::READ_INTEGRITY_CHECK; +#endif } void AntiCheat::FlagIntegrityCheck() @@ -327,6 +329,7 @@ namespace Components unsigned long AntiCheat::ProtectProcess() { +#ifdef PROCTECT_PROCESS Utils::Memory::Allocator allocator; HANDLE hToken = nullptr; @@ -461,6 +464,9 @@ namespace Components pDacl, nullptr // SACL ); +#else + return 0; +#endif } AntiCheat::AntiCheat() diff --git a/src/Components/Modules/AntiCheat.hpp b/src/Components/Modules/AntiCheat.hpp index 6f01c94c..4c32f9ee 100644 --- a/src/Components/Modules/AntiCheat.hpp +++ b/src/Components/Modules/AntiCheat.hpp @@ -5,6 +5,9 @@ #define AntiCheat SubComponent #endif +// Uncomment to enable process protection (conflicts with steam!) +//#define PROCTECT_PROCESS + namespace Components { class AntiCheat : public Component @@ -32,7 +35,10 @@ namespace Components INITIALIZATION = (1 << 0), MEMORY_SCAN = (1 << 1), SCAN_INTEGRITY_CHECK = (1 << 2), + +#ifdef PROCTECT_PROCESS READ_INTEGRITY_CHECK = (1 << 3), +#endif MAX_FLAG, }; diff --git a/src/Components/Modules/ServerList.cpp b/src/Components/Modules/ServerList.cpp index 72070f65..f939451a 100644 --- a/src/Components/Modules/ServerList.cpp +++ b/src/Components/Modules/ServerList.cpp @@ -773,7 +773,7 @@ namespace Components Renderer::OnFrame(ServerList::Frame); // This is placed here in case the anticheat has been disabled! -#if !defined(DEBUG) && !defined(DISABLE_ANTICHEAT) +#if !defined(DEBUG) && !defined(DISABLE_ANTICHEAT) && defined(PROCTECT_PROCESS) Renderer::OnFrame(AntiCheat::ReadIntegrityCheck); #endif }