mirror of
https://github.com/azerothcore/mod-anticheat.git
synced 2026-01-13 00:58:35 +00:00
fix (module) False Hit fix Fence Walking Telepane
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user