update (detection): Teleport Hack Edge Case

This commit is contained in:
MDIC
2022-08-11 13:21:48 -04:00
parent 039ed9b782
commit 144d814432

View File

@@ -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<uint32>("Anticheat.ReportsForIngameWarnings", 70))
{