[AntiCheat] Disable process protection as it conflicts with steam

This commit is contained in:
momo5502 2017-01-26 20:41:39 +01:00
parent 22fbfcd588
commit 07746095b7
3 changed files with 13 additions and 1 deletions

View File

@ -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()

View File

@ -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,
};

View File

@ -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
}