From aee2361ba69e2404eff87d023a808201dd702c98 Mon Sep 17 00:00:00 2001 From: M'Dic Date: Fri, 5 Jan 2024 17:15:56 -0500 Subject: [PATCH] update (anticheat): False hits for select elevators --- src/server/game/Anticheat/AnticheatMgr.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/server/game/Anticheat/AnticheatMgr.cpp b/src/server/game/Anticheat/AnticheatMgr.cpp index 8aada3fdd3..00ef12425b 100644 --- a/src/server/game/Anticheat/AnticheatMgr.cpp +++ b/src/server/game/Anticheat/AnticheatMgr.cpp @@ -167,8 +167,7 @@ void AnticheatMgr::StartHackDetection(Player* player, MovementInfo& movementInfo void AnticheatMgr::MapSpeedTeleExemption(Player* player, MovementInfo& movementInfo) { // The anticheat is disabled on transports, so we need to be sure that the player is indeed on a transport. - Unit* mover = player->m_mover; - GameObject* transportGobj = mover->GetMap()->GetGameObject(movementInfo.transport.guid); + GameObject* transportGobj = player->GetMap()->GetGameObject(movementInfo.transport.guid); float maxDist2d = 70.0f; // Transports usually dont go far away. if (player->GetMapId() == 369) // Deeprun tram { @@ -448,6 +447,13 @@ void AnticheatMgr::JumpHackDetection(Player* player, MovementInfo& movementInfo, if (!distance2D) return; + // The anticheat is disabled on transports, so we need to be sure that the player is indeed on a transport. + GameObject* transportGobj = player->GetMap()->GetGameObject(movementInfo.transport.guid); + if (transportGobj && transportGobj->IsTransport()) + { + return; + } + if (!player->HasUnitMovementFlag(MOVEMENTFLAG_DISABLE_GRAVITY) && movementInfo.jump.zspeed < -10.0f) return;