mirror of
https://github.com/azerothcore/mod-anticheat.git
synced 2026-02-01 01:43:50 +00:00
Dont check for SpeedHack if the player hasnt moved
We don't need to check for a speedhack if the player hasn't moved This is necessary since MovementHandler fires if you rotate the camera in place Co-Authored-By: Jinnaix <37972361+jinnaix@users.noreply.github.com> Co-Authored-By: Sven <36102838+sveN295@users.noreply.github.com>
This commit is contained in:
@@ -417,6 +417,11 @@ void AnticheatMgr::SpeedHackDetection(Player* player, MovementInfo movementInfo)
|
|||||||
uint32 distance2D = (uint32)movementInfo.pos.GetExactDist2d(&m_Players[key].GetLastMovementInfo().pos);
|
uint32 distance2D = (uint32)movementInfo.pos.GetExactDist2d(&m_Players[key].GetLastMovementInfo().pos);
|
||||||
uint8 moveType = 0;
|
uint8 moveType = 0;
|
||||||
|
|
||||||
|
// We don't need to check for a speedhack if the player hasn't moved
|
||||||
|
// This is necessary since MovementHandler fires if you rotate the camera in place
|
||||||
|
if (!distance2D)
|
||||||
|
return;
|
||||||
|
|
||||||
// we need to know HOW is the player moving
|
// we need to know HOW is the player moving
|
||||||
// TO-DO: Should we check the incoming movement flags?
|
// TO-DO: Should we check the incoming movement flags?
|
||||||
if (player->HasUnitMovementFlag(MOVEMENTFLAG_SWIMMING))
|
if (player->HasUnitMovementFlag(MOVEMENTFLAG_SWIMMING))
|
||||||
|
|||||||
Reference in New Issue
Block a user