update (module): Ignore control check and cs adj

Included a latency check if player has bad latency which should nerf out the false hits with ignore control. Set all anticheat cmds to false for console use due to using the gm cmds on a console did nothing.
This commit is contained in:
MDIC
2022-04-29 09:19:32 -04:00
parent f122d551e9
commit bf0cc0aa78
2 changed files with 9 additions and 7 deletions

View File

@@ -186,7 +186,9 @@ void AnticheatMgr::IgnoreControlHackDetection(Player* player, MovementInfo movem
if (sConfigMgr->GetOption<bool>("Anticheat.IgnoreControlHack", true))
{
if (player->HasUnitState(UNIT_STATE_ROOT) && !player->GetVehicle())
uint32 latency = 0;
latency = player->GetSession()->GetLatency() >= 400;
if (player->HasUnitState(UNIT_STATE_ROOT) && !player->GetVehicle() && !latency)
{
bool unrestricted = movementInfo.pos.GetPositionX() != x || movementInfo.pos.GetPositionY() != y;
if (unrestricted)

View File

@@ -44,18 +44,18 @@ public:
{
static std::vector<ChatCommand> anticheatCommandTable =
{
{ "global", SEC_GAMEMASTER, true, &HandleAntiCheatGlobalCommand, "" },
{ "player", SEC_GAMEMASTER, true, &HandleAntiCheatPlayerCommand, "" },
{ "delete", SEC_ADMINISTRATOR, true, &HandleAntiCheatDeleteCommand, "" },
{ "global", SEC_GAMEMASTER, false, &HandleAntiCheatGlobalCommand, "" },
{ "player", SEC_GAMEMASTER, false, &HandleAntiCheatPlayerCommand, "" },
{ "delete", SEC_ADMINISTRATOR, false, &HandleAntiCheatDeleteCommand, "" },
{ "jail", SEC_GAMEMASTER, false, &HandleAnticheatJailCommand, "" },
{ "parole", SEC_ADMINISTRATOR, false, &HandleAnticheatParoleCommand, "" },
{ "purge", SEC_ADMINISTRATOR, true, &HandleAntiCheatPurgeCommand, "" },
{ "warn", SEC_GAMEMASTER, true, &HandleAnticheatWarnCommand, "" }
{ "purge", SEC_ADMINISTRATOR, false, &HandleAntiCheatPurgeCommand, "" },
{ "warn", SEC_GAMEMASTER, false, &HandleAnticheatWarnCommand, "" }
};
static std::vector<ChatCommand> commandTable =
{
{ "anticheat", SEC_GAMEMASTER, true, NULL, "", anticheatCommandTable},
{ "anticheat", SEC_GAMEMASTER, false, NULL, "", anticheatCommandTable},
};
return commandTable;