From 765128144db2b9ad2dfb734c4d6cd533917d46b2 Mon Sep 17 00:00:00 2001 From: MDIC Date: Fri, 25 Feb 2022 14:02:11 -0500 Subject: [PATCH] Adjustment Made to reduce false reports when calling Typos fixed and Adjustments to make to reduce false reporting when falling. addition check introduced for speed hacks involving less then a 0 ms timing --- src/AnticheatMgr.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/AnticheatMgr.cpp b/src/AnticheatMgr.cpp index 2ef9360..f970c51 100644 --- a/src/AnticheatMgr.cpp +++ b/src/AnticheatMgr.cpp @@ -329,7 +329,7 @@ void AnticheatMgr::SpeedHackDetection(Player* player, MovementInfo movementInfo) switch (player->GetMapId()) { case 369: //Transport: DEEPRUN TRAM - case 607: //Transport: Strands of Strand of the Ancients + case 607: //Transport: Strands of the Ancients case 582: //Transport: Rut'theran to Auberdine case 584: //Transport: Menethil to Theramore case 586: //Transport: Exodar to Auberdine @@ -351,13 +351,13 @@ void AnticheatMgr::SpeedHackDetection(Player* player, MovementInfo movementInfo) case 622: //Transport: Orgrim's Hammer case 623: //Transport: The Skybreaker case 641: //Transport: Alliance Airship BG - case 642: //Transport: HordeAirshipBG + case 642: //Transport: Horde Airship BG case 647: //Transport: Orgrimmar to Thunder Bluff case 672: //Transport: The Skybreaker (Icecrown Citadel Raid) case 673: //Transport: Orgrim's Hammer (Icecrown Citadel Raid) case 712: //Transport: The Skybreaker (IC Dungeon) case 713: //Transport: Orgrim's Hammer (IC Dungeon) - case 718: //Trasnport: The Mighty Wind (Icecrown Citadel Raid) + case 718: //Transport: The Mighty Wind (Icecrown Citadel Raid) return; break; } @@ -382,6 +382,12 @@ void AnticheatMgr::SpeedHackDetection(Player* player, MovementInfo movementInfo) // how long the player took to move to here. uint32 timeDiff = getMSTimeDiff(m_Players[key].GetLastMovementInfo().time, movementInfo.time); + if (int32(timeDiff) < 0) + { + BuildReport(player, SPEED_HACK_REPORT); + timeDiff = 1; + } + if (!timeDiff) timeDiff = 1; @@ -389,7 +395,7 @@ void AnticheatMgr::SpeedHackDetection(Player* player, MovementInfo movementInfo) uint32 clientSpeedRate = distance2D * 1000 / timeDiff; // we did the (uint32) cast to accept a margin of tolerance - if (clientSpeedRate > speedRate) + if (clientSpeedRate > speedRate * 1.25f) { if (sConfigMgr->GetOption("Anticheat.WriteLog", false)) LOG_INFO("module", "AnticheatMgr:: Speed-Hack detected player {} ({})", player->GetName(), player->GetGUID().ToString());