Update (module): Reduce Detection

This commit is contained in:
MDIC
2022-04-27 17:38:31 -04:00
parent 90d2f84576
commit 8bffa19a40

View File

@@ -244,6 +244,13 @@ void AnticheatMgr::ZAxisHackDetection(Player* player, MovementInfo movementInfo)
if (player->GetLiquidData().Status == LIQUID_MAP_ABOVE_WATER && movementInfo.HasMovementFlag(MOVEMENTFLAG_ONTRANSPORT)) if (player->GetLiquidData().Status == LIQUID_MAP_ABOVE_WATER && movementInfo.HasMovementFlag(MOVEMENTFLAG_ONTRANSPORT))
return; 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 // 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() if (m_Players[key].GetLastMovementInfo().pos.GetPositionZ() == movementInfo.pos.GetPositionZ()
&& player->GetPositionZ() >= player->GetFloorZ() + 2.5f) && player->GetPositionZ() >= player->GetFloorZ() + 2.5f)