[AntiCheat] Make unreachable code useful again

This commit is contained in:
TheApadayo 2019-01-06 13:15:20 -05:00
parent 2594f3fdf8
commit 93d02d6f56
2 changed files with 3 additions and 4 deletions

View File

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

View File

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