fix (module) False Hit fix Fence Walking Telepane

This commit is contained in:
MDIC
2022-05-13 17:25:44 -04:00
parent e95d6eb1fc
commit 451a4e5448

View File

@@ -159,6 +159,13 @@ void AnticheatMgr::TeleportPlaneHackDetection(Player* player, MovementInfo movem
ObjectGuid key = player->GetGUID();
uint32 distance2D = (uint32)movementInfo.pos.GetExactDist2d(&m_Players[key].GetLastMovementInfo().pos);
// We don't need to check for a water walking hack if the player hasn't moved
// This is necessary since MovementHandler fires if you rotate the camera in place
if (!distance2D)
return;
if (player->HasAuraType(SPELL_AURA_WATER_WALK) || player->HasAuraType(SPELL_AURA_WATER_BREATHING) || player->HasAuraType(SPELL_AURA_GHOST))
return;
@@ -184,7 +191,7 @@ void AnticheatMgr::TeleportPlaneHackDetection(Player* player, MovementInfo movem
float floorZ = player->GetMapHeight(player->GetPositionX(), player->GetPositionY(), player->GetPositionZ());
// we are not really walking there
if (groundZ == floorZ && (fabs(ground_Z - pos_z) > 1.0f || fabs(ground_Z - pos_z) < -1.0f))
if (groundZ == floorZ && (fabs(ground_Z - pos_z) > 2.0f || fabs(ground_Z - pos_z) < -1.0f))
{
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
{