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
This commit is contained in:
M'Dic
2022-10-17 16:01:03 -04:00
parent dad0fd6d8a
commit 946e888a18

View File

@@ -224,7 +224,7 @@ void AnticheatMgr::SpeedHackDetection(Player* player, MovementInfo movementInfo)
// We did the (uint32) cast to accept a margin of tolerance // 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 // 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()) if (!player->CanTeleport())
{ {
@@ -476,7 +476,7 @@ void AnticheatMgr::TeleportHackDetection(Player* player, MovementInfo movementIn
if (player->duel) 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; Player* opponent = player->duel->Opponent;
@@ -504,7 +504,7 @@ void AnticheatMgr::TeleportHackDetection(Player* player, MovementInfo movementIn
player->SetCanTeleport(false); 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<uint32>("Anticheat.ReportsForIngameWarnings", 70)) if (m_Players[key].GetTotalReports() > sConfigMgr->GetOption<uint32>("Anticheat.ReportsForIngameWarnings", 70))
{ {