fix(Core/Travel): LOS gate on empty-probe single-waypoint fallback

This commit is contained in:
bash 2026-05-14 21:59:35 +02:00
parent 6a0dc3f2f6
commit a7a3a5fb78

View File

@ -281,6 +281,18 @@ bool NewRpgBaseAction::MoveFarTo(WorldPosition dest)
if (bot->GetMapId() != dest.GetMapId())
return false;
// LOS gate — refuse to dispatch a straight-line spline when
// the dest isn't in line of sight. Engine PathGenerator may
// return a BuildShortcut 2-point line through visual obstacles
// (trees, walls) when start/end polyref resolution fails. Let
// UnstuckAction handle prolonged stuck states.
if (!bot->IsWithinLOS(dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ()))
{
EmitDebugMove("MoveFar", "spline-blocked",
dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ());
return false;
}
EmitDebugMove("MoveFar", "spline",
dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ());
return MoveTo(dest.GetMapId(), dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ(),