Skip to content

Commit

Permalink
update (anticheat): Z-Axis false hit
Browse files Browse the repository at this point in the history
  • Loading branch information
acidmanifesto committed Jan 8, 2024
1 parent 42d0b39 commit 82d4333
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/server/game/Anticheat/AnticheatMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,12 @@ void AnticheatMgr::ZAxisHackDetection(Player* player, MovementInfo movementInfo)
return;

uint32 key = player->GetGUID().GetCounter();
uint32 distance2D = (uint32)movementInfo.pos.GetExactDist2d(&m_Players[key].GetLastMovementInfo().pos);

// We don't need to check for a waterwalk hack if the player hasn't moved
// This is necessary since MovementHandler fires if you rotate the camera in place
if (!distance2D)
return;

// If he is flying we dont need to check
if (movementInfo.HasMovementFlag(MOVEMENTFLAG_CAN_FLY | MOVEMENTFLAG_FLYING))
Expand Down

0 comments on commit 82d4333

Please sign in to comment.