From b7437170b44f062cfa1c41d23de6e50bec6ac874 Mon Sep 17 00:00:00 2001 From: bash Date: Wed, 6 May 2026 23:40:07 +0200 Subject: [PATCH] fix(Core/RPG): Drop counterproductive LOS cull in MoveFar mmap chain --- src/Ai/World/Rpg/Action/NewRpgBaseAction.cpp | 22 -------------------- 1 file changed, 22 deletions(-) diff --git a/src/Ai/World/Rpg/Action/NewRpgBaseAction.cpp b/src/Ai/World/Rpg/Action/NewRpgBaseAction.cpp index f03bb3ff2..1680f2184 100644 --- a/src/Ai/World/Rpg/Action/NewRpgBaseAction.cpp +++ b/src/Ai/World/Rpg/Action/NewRpgBaseAction.cpp @@ -235,28 +235,6 @@ bool NewRpgBaseAction::MoveFarTo(WorldPosition dest) for (auto& pt : points) bot->UpdateAllowedPositionZ(pt.x, pt.y, pt.z); - // Drop waypoints whose segment crosses geometry (Fix B - // logic, mirrored from LaunchWalkSpline). A pair of - // ground-level waypoints with a mountain between them - // would otherwise spline straight through. - if (Map* losMap = bot->GetMap()) - { - uint32 const phaseMask = bot->GetPhaseMask(); - for (size_t i = 1; i < points.size(); /* incremented in body */) - { - G3D::Vector3 const& a = points[i - 1]; - G3D::Vector3 const& b = points[i]; - if (!losMap->isInLineOfSight(a.x, a.y, a.z + 2.0f, - b.x, b.y, b.z + 2.0f, phaseMask, LINEOFSIGHT_ALL_CHECKS, - VMAP::ModelIgnoreFlags::Nothing)) - { - points.erase(points.begin() + i); - continue; - } - ++i; - } - } - if (points.size() >= 2) { // Cap the chain at 20 waypoints. Beyond that, the