From 8bffa19a4046372a84156503a5f3d7dfd5da8970 Mon Sep 17 00:00:00 2001 From: MDIC Date: Wed, 27 Apr 2022 17:38:31 -0400 Subject: [PATCH] Update (module): Reduce Detection --- src/AnticheatMgr.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/AnticheatMgr.cpp b/src/AnticheatMgr.cpp index 48af7c5..b8496d0 100644 --- a/src/AnticheatMgr.cpp +++ b/src/AnticheatMgr.cpp @@ -244,6 +244,13 @@ void AnticheatMgr::ZAxisHackDetection(Player* player, MovementInfo movementInfo) if (player->GetLiquidData().Status == LIQUID_MAP_ABOVE_WATER && movementInfo.HasMovementFlag(MOVEMENTFLAG_ONTRANSPORT)) return; + uint32 distance2D = (uint32)movementInfo.pos.GetExactDist2d(&m_Players[key].GetLastMovementInfo().pos); + + // We don't need to check for a ignore z if the player hasn't moved + // This is necessary since MovementHandler fires if you rotate the camera in place + if (!distance2D) + return; + // This is Black Magic. Check only for x and y difference but no z difference that is greater then or equal to z +2.5 of the ground if (m_Players[key].GetLastMovementInfo().pos.GetPositionZ() == movementInfo.pos.GetPositionZ() && player->GetPositionZ() >= player->GetFloorZ() + 2.5f)