From 451a4e5448296cef9f306aa120ab64bcc2518a56 Mon Sep 17 00:00:00 2001 From: MDIC Date: Fri, 13 May 2022 17:25:44 -0400 Subject: [PATCH] fix (module) False Hit fix Fence Walking Telepane --- src/AnticheatMgr.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/AnticheatMgr.cpp b/src/AnticheatMgr.cpp index 37007a5..200abff 100644 --- a/src/AnticheatMgr.cpp +++ b/src/AnticheatMgr.cpp @@ -159,6 +159,13 @@ void AnticheatMgr::TeleportPlaneHackDetection(Player* player, MovementInfo movem ObjectGuid key = player->GetGUID(); + uint32 distance2D = (uint32)movementInfo.pos.GetExactDist2d(&m_Players[key].GetLastMovementInfo().pos); + + // We don't need to check for a water walking hack if the player hasn't moved + // This is necessary since MovementHandler fires if you rotate the camera in place + if (!distance2D) + return; + if (player->HasAuraType(SPELL_AURA_WATER_WALK) || player->HasAuraType(SPELL_AURA_WATER_BREATHING) || player->HasAuraType(SPELL_AURA_GHOST)) return; @@ -184,7 +191,7 @@ void AnticheatMgr::TeleportPlaneHackDetection(Player* player, MovementInfo movem float floorZ = player->GetMapHeight(player->GetPositionX(), player->GetPositionY(), player->GetPositionZ()); // we are not really walking there - if (groundZ == floorZ && (fabs(ground_Z - pos_z) > 1.0f || fabs(ground_Z - pos_z) < -1.0f)) + if (groundZ == floorZ && (fabs(ground_Z - pos_z) > 2.0f || fabs(ground_Z - pos_z) < -1.0f)) { if (sConfigMgr->GetOption("Anticheat.WriteLog", true)) {