mirror of
https://github.com/azerothcore/mod-anticheat.git
synced 2026-01-23 05:26:24 +00:00
fix (module): Wall Climb False hit reduction
This commit is contained in:
@@ -410,7 +410,7 @@ void AnticheatMgr::StartHackDetection(Player* player, MovementInfo movementInfo,
|
||||
FlyHackDetection(player, movementInfo);
|
||||
JumpHackDetection(player, movementInfo, opcode);
|
||||
TeleportPlaneHackDetection(player, movementInfo);
|
||||
ClimbHackDetection(player, movementInfo);
|
||||
ClimbHackDetection(player, movementInfo, opcode);
|
||||
TeleportHackDetection(player, movementInfo);
|
||||
IgnoreControlHackDetection(player, movementInfo);
|
||||
if (player->GetLiquidData().Status == LIQUID_MAP_WATER_WALK)
|
||||
@@ -426,7 +426,7 @@ void AnticheatMgr::StartHackDetection(Player* player, MovementInfo movementInfo,
|
||||
}
|
||||
|
||||
// basic detection
|
||||
void AnticheatMgr::ClimbHackDetection(Player* player, MovementInfo movementInfo)
|
||||
void AnticheatMgr::ClimbHackDetection(Player* player, MovementInfo movementInfo, uint32 opcode)
|
||||
{
|
||||
if (!sConfigMgr->GetOption<bool>("Anticheat.DetectClimbHack", true))
|
||||
return;
|
||||
@@ -437,6 +437,14 @@ void AnticheatMgr::ClimbHackDetection(Player* player, MovementInfo movementInfo)
|
||||
player->IsFalling())
|
||||
return;
|
||||
|
||||
// If the player jumped, we dont want to check for climb hack
|
||||
// This can lead to false positives for climbing game objects legit
|
||||
if (opcode == MSG_MOVE_JUMP)
|
||||
return;
|
||||
|
||||
if (player->HasUnitMovementFlag(MOVEMENTFLAG_FALLING))
|
||||
return;
|
||||
|
||||
Position playerPos = player->GetPosition();
|
||||
|
||||
float diffz = fabs(movementInfo.pos.GetPositionZ() - playerPos.GetPositionZ());
|
||||
|
||||
Reference in New Issue
Block a user