fix(Core/RPG): Drop counterproductive LOS cull in MoveFar mmap chain

This commit is contained in:
bash 2026-05-06 23:40:07 +02:00
parent 5a2343824c
commit b7437170b4

View File

@ -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