Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
update (anticheat): False hits for select elevators
Browse files Browse the repository at this point in the history
  • Loading branch information
acidmanifesto committed Feb 19, 2024
1 parent 83e023d commit 6cbf038
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/server/game/Anticheat/AnticheatMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 6cbf038

Please sign in to comment.