From 81f0dbfd81600fa895c658cf597487f5c17b6f89 Mon Sep 17 00:00:00 2001 From: MDIC Date: Wed, 11 May 2022 07:48:45 -0400 Subject: [PATCH] fix (module): False Detection Telepane Hack --- src/AnticheatMgr.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/AnticheatMgr.cpp b/src/AnticheatMgr.cpp index 7cae130..ec454fa 100644 --- a/src/AnticheatMgr.cpp +++ b/src/AnticheatMgr.cpp @@ -175,10 +175,11 @@ void AnticheatMgr::TeleportPlaneHackDetection(Player* player, MovementInfo movem float pos_z = player->GetPositionZ(); float ground_Z = player->GetFloorZ(); - float z_diff = fabs(ground_Z - pos_z); + float groundZ = player->GetMapHeight(player->GetPositionX(), player->GetPositionY(), MAX_HEIGHT); + float floorZ = player->GetMapHeight(player->GetPositionX(), player->GetPositionY(), player->GetPositionZ()); // we are not really walking there - if (z_diff > 1.0f) + if (groundZ == floorZ && (fabs(ground_Z - pos_z) > 1.0f || fabs(ground_Z - pos_z) < -1.0f)) { if (sConfigMgr->GetOption("Anticheat.WriteLog", true)) { @@ -189,6 +190,7 @@ void AnticheatMgr::TeleportPlaneHackDetection(Player* player, MovementInfo movem BuildReport(player, TELEPORT_PLANE_HACK_REPORT); } + } void AnticheatMgr::IgnoreControlHackDetection(Player* player, MovementInfo movementInfo, uint32 opcode)