From 946e888a18601f946370133b92b9f518ebec3b0b Mon Sep 17 00:00:00 2001 From: M'Dic Date: Mon, 17 Oct 2022 16:01:03 -0400 Subject: [PATCH] Update (detections): Fine tune Fine tune due to reports of speeds buffs of 3 to 5% to speed causing false hits. Added teleport additional check for falling due to edge case with possible flight managers and jumping off ledges --- src/AnticheatMgr.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/AnticheatMgr.cpp b/src/AnticheatMgr.cpp index 5001971..1d65873 100644 --- a/src/AnticheatMgr.cpp +++ b/src/AnticheatMgr.cpp @@ -224,7 +224,7 @@ void AnticheatMgr::SpeedHackDetection(Player* player, MovementInfo movementInfo) // We did the (uint32) cast to accept a margin of tolerance // We check the last MovementInfo for the falling flag since falling down a hill and sliding a bit triggered a false positive - if ((clientSpeedRate > speedRate) && !m_Players[key].GetLastMovementInfo().HasMovementFlag(MOVEMENTFLAG_FALLING)) + if ((clientSpeedRate > speedRate * 1.05f) && !m_Players[key].GetLastMovementInfo().HasMovementFlag(MOVEMENTFLAG_FALLING)) { if (!player->CanTeleport()) { @@ -476,7 +476,7 @@ void AnticheatMgr::TeleportHackDetection(Player* player, MovementInfo movementIn if (player->duel) { - if ((xDiff >= 50.0f || yDiff >= 50.0f || (zDiff >= 10.0f && !player->IsFlying())) && !player->CanTeleport()) + if ((xDiff >= 50.0f || yDiff >= 50.0f || (zDiff >= 10.0f && !player->IsFlying() && !player->IsFalling())) && !player->CanTeleport()) { Player* opponent = player->duel->Opponent; @@ -504,7 +504,7 @@ void AnticheatMgr::TeleportHackDetection(Player* player, MovementInfo movementIn player->SetCanTeleport(false); } - if ((xDiff >= 50.0f || yDiff >= 50.0f || (zDiff >= 10.0f && !player->IsFlying())) && !player->CanTeleport()) + if ((xDiff >= 50.0f || yDiff >= 50.0f || (zDiff >= 10.0f && !player->IsFlying() && !player->IsFalling())) && !player->CanTeleport()) { if (m_Players[key].GetTotalReports() > sConfigMgr->GetOption("Anticheat.ReportsForIngameWarnings", 70)) {