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)