From 93d02d6f5622046ed9203f6ea0530fafae7e554d Mon Sep 17 00:00:00 2001 From: TheApadayo Date: Sun, 6 Jan 2019 13:15:20 -0500 Subject: [PATCH] [AntiCheat] Make unreachable code useful again --- src/Components/Loader.cpp | 2 -- src/Components/Modules/AntiCheat.cpp | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Components/Loader.cpp b/src/Components/Loader.cpp index 10f487eb..19510b9a 100644 --- a/src/Components/Loader.cpp +++ b/src/Components/Loader.cpp @@ -72,9 +72,7 @@ namespace Components Loader::Register(new Renderer()); Loader::Register(new UIFeeder()); Loader::Register(new UIScript()); -#ifndef DISABLE_ANTICHEAT Loader::Register(new AntiCheat()); -#endif Loader::Register(new Changelog()); Loader::Register(new Dedicated()); Loader::Register(new Discovery()); diff --git a/src/Components/Modules/AntiCheat.cpp b/src/Components/Modules/AntiCheat.cpp index da9af5ee..40a6aacb 100644 --- a/src/Components/Modules/AntiCheat.cpp +++ b/src/Components/Modules/AntiCheat.cpp @@ -831,13 +831,12 @@ namespace Components time(nullptr); AntiCheat::Flags = NO_FLAG; -#ifdef DEBUG +#ifdef DISABLE_ANTICHEAT Command::Add("penis", [](Command::Params*) { AntiCheat::CrashClient(); }); #else - Utils::Hook(0x507BD5, AntiCheat::PatchWinAPI, HOOK_CALL).install()->quick(); Utils::Hook(0x5082FD, AntiCheat::LostD3DStub, HOOK_CALL).install()->quick(); Utils::Hook(0x51C76C, AntiCheat::CinematicStub, HOOK_CALL).install()->quick(); @@ -866,6 +865,8 @@ namespace Components // Set the integrity flag AntiCheat::Flags |= AntiCheat::IntergrityFlag::INITIALIZATION; + + #endif __VMProtectEnd;