[AntiCheat] Add --ac-disable premake flag
This commit is contained in:
parent
3c31e393c2
commit
b045a488e1
@ -24,6 +24,7 @@
|
|||||||
| ------------- | ------------- |
|
| ------------- | ------------- |
|
||||||
| `--copy-to=PATH` | Optional, copy the DLL to a custom folder after build, define the path here if wanted. |
|
| `--copy-to=PATH` | Optional, copy the DLL to a custom folder after build, define the path here if wanted. |
|
||||||
| `--copy-pdb` | Copy debug information for binaries as well to the path given via --copy-to. |
|
| `--copy-pdb` | Copy debug information for binaries as well to the path given via --copy-to. |
|
||||||
|
| `--ac-disable` | Disable anticheat. |
|
||||||
| `--ac-debug-detections` | Log anticheat detections. |
|
| `--ac-debug-detections` | Log anticheat detections. |
|
||||||
| `--ac-debug-load-library` | Log libraries that get loaded. |
|
| `--ac-debug-load-library` | Log libraries that get loaded. |
|
||||||
| `--force-unit-tests` | Always compile unit tests. |
|
| `--force-unit-tests` | Always compile unit tests. |
|
||||||
|
@ -43,6 +43,11 @@ newoption {
|
|||||||
description = "Copy debug information for binaries as well to the path given via --copy-to."
|
description = "Copy debug information for binaries as well to the path given via --copy-to."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
newoption {
|
||||||
|
trigger = "ac-disable",
|
||||||
|
description = "Disable anticheat."
|
||||||
|
}
|
||||||
|
|
||||||
newoption {
|
newoption {
|
||||||
trigger = "ac-debug-detections",
|
trigger = "ac-debug-detections",
|
||||||
description = "Log anticheat detections."
|
description = "Log anticheat detections."
|
||||||
@ -311,6 +316,9 @@ workspace "iw4x"
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- Debug flags
|
-- Debug flags
|
||||||
|
if _OPTIONS["ac-disable"] then
|
||||||
|
defines { "DISABLE_ANTICHEAT" }
|
||||||
|
end
|
||||||
if _OPTIONS["ac-debug-detections"] then
|
if _OPTIONS["ac-debug-detections"] then
|
||||||
defines { "DEBUG_DETECTIONS" }
|
defines { "DEBUG_DETECTIONS" }
|
||||||
end
|
end
|
||||||
|
@ -48,7 +48,9 @@ namespace Components
|
|||||||
Loader::Register(new Renderer());
|
Loader::Register(new Renderer());
|
||||||
Loader::Register(new UIFeeder());
|
Loader::Register(new UIFeeder());
|
||||||
Loader::Register(new UIScript());
|
Loader::Register(new UIScript());
|
||||||
|
#ifndef DISABLE_ANTICHEAT
|
||||||
Loader::Register(new AntiCheat());
|
Loader::Register(new AntiCheat());
|
||||||
|
#endif
|
||||||
Loader::Register(new Dedicated());
|
Loader::Register(new Dedicated());
|
||||||
Loader::Register(new Discovery());
|
Loader::Register(new Discovery());
|
||||||
Loader::Register(new Exception());
|
Loader::Register(new Exception());
|
||||||
|
@ -86,7 +86,7 @@ namespace Components
|
|||||||
|
|
||||||
// This is placed here in case the anticheat has been disabled!
|
// This is placed here in case the anticheat has been disabled!
|
||||||
// Make sure this is called after the memory scan!
|
// Make sure this is called after the memory scan!
|
||||||
#ifndef DEBUG
|
#if !defined(DEBUG) && !defined(DISABLE_ANTICHEAT)
|
||||||
Utils::Hook(0x5ACB9E, [] () // Somewhere in the renderer, past the scan check
|
Utils::Hook(0x5ACB9E, [] () // Somewhere in the renderer, past the scan check
|
||||||
{
|
{
|
||||||
AntiCheat::ScanIntegrityCheck();
|
AntiCheat::ScanIntegrityCheck();
|
||||||
|
@ -101,7 +101,7 @@ namespace Components
|
|||||||
|
|
||||||
// This is placed here in case the anticheat has been disabled!
|
// This is placed here in case the anticheat has been disabled!
|
||||||
// Make sure this is called after every onther anticheat check!
|
// Make sure this is called after every onther anticheat check!
|
||||||
#ifndef DEBUG
|
#if !defined(DEBUG) && !defined(DISABLE_ANTICHEAT)
|
||||||
Utils::Hook(0x5ACBA3, [] () // Somewhere in the renderer, past other renderer hooks!
|
Utils::Hook(0x5ACBA3, [] () // Somewhere in the renderer, past other renderer hooks!
|
||||||
{
|
{
|
||||||
AntiCheat::FlagIntegrityCheck();
|
AntiCheat::FlagIntegrityCheck();
|
||||||
|
@ -723,7 +723,7 @@ namespace Components
|
|||||||
Renderer::OnFrame(ServerList::Frame);
|
Renderer::OnFrame(ServerList::Frame);
|
||||||
|
|
||||||
// This is placed here in case the anticheat has been disabled!
|
// This is placed here in case the anticheat has been disabled!
|
||||||
#ifndef DEBUG
|
#if !defined(DEBUG) && !defined(DISABLE_ANTICHEAT)
|
||||||
Renderer::OnFrame(AntiCheat::ReadIntegrityCheck);
|
Renderer::OnFrame(AntiCheat::ReadIntegrityCheck);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user