From 144d8144323a71a1c419b84347f4c09e74260910 Mon Sep 17 00:00:00 2001 From: MDIC Date: Thu, 11 Aug 2022 13:21:48 -0400 Subject: [PATCH] update (detection): Teleport Hack Edge Case --- src/AnticheatMgr.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/AnticheatMgr.cpp b/src/AnticheatMgr.cpp index 387a20b..2dcbacd 100644 --- a/src/AnticheatMgr.cpp +++ b/src/AnticheatMgr.cpp @@ -373,9 +373,12 @@ void AnticheatMgr::TeleportHackDetection(Player* player, MovementInfo movementIn float yDiff = fabs(lastY - newY); float zDiff = fabs(lastZ - newZ); + if (movementInfo.HasMovementFlag(MOVEMENTFLAG_FALLING)) + return; + if (player->duel) { - if ((xDiff >= 50.0f || yDiff >= 50.0f || (zDiff >= 10.0f && !player->IsFlying() && movementInfo.HasMovementFlag(MOVEMENTFLAG_FALLING))) && !player->CanTeleport()) + if ((xDiff >= 50.0f || yDiff >= 50.0f || (zDiff >= 10.0f && !player->IsFlying())) && !player->CanTeleport()) { Player* opponent = player->duel->Opponent; @@ -401,7 +404,7 @@ void AnticheatMgr::TeleportHackDetection(Player* player, MovementInfo movementIn player->SetCanTeleport(false); } - if ((xDiff >= 50.0f || yDiff >= 50.0f || (zDiff >= 10.0f && !player->IsFlying() && movementInfo.HasMovementFlag(MOVEMENTFLAG_FALLING))) && !player->CanTeleport()) + if ((xDiff >= 50.0f || yDiff >= 50.0f || (zDiff >= 10.0f && !player->IsFlying())) && !player->CanTeleport()) { if (m_Players[key].GetTotalReports() > sConfigMgr->GetOption("Anticheat.ReportsForIngameWarnings", 70)) {