mirror of
https://github.com/azerothcore/mod-anticheat.git
synced 2026-01-13 00:58:35 +00:00
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:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user