From e128bbb82ea4d3cff02692bd9613ea436fc1284c Mon Sep 17 00:00:00 2001 From: bash Date: Fri, 8 May 2026 10:34:40 +0200 Subject: [PATCH] feat(Core/Travel): Enable PathGenerator slope check on chained probe --- src/Mgr/Travel/TravelMgr.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Mgr/Travel/TravelMgr.cpp b/src/Mgr/Travel/TravelMgr.cpp index 85924b04a..d06aa8ee4 100644 --- a/src/Mgr/Travel/TravelMgr.cpp +++ b/src/Mgr/Travel/TravelMgr.cpp @@ -730,6 +730,14 @@ std::vector WorldPosition::getPathStepFrom(WorldPosition startPos // the previous step's endpoint, giving the 40-attempt walker // its intended multi-tile reach. PathGenerator path(pathUnit); + // Stricter walkability validation than navmesh extract alone: per- + // segment runtime check against the unit's collision-height climb + // formula. Detour may return paths up steep slopes that the + // walkable-slope-angle filter at extract time accepted but that the + // unit physically can't walk; SetSlopeCheck rejects those at + // pathfind time (returns DT_SLOPE_TOO_STEEP / shorter path). + // Engine uses this in FleeingMovementGenerator only. + path.SetSlopeCheck(true); path.CalculatePath(startPos.GetPositionX(), startPos.GetPositionY(), startPos.GetPositionZ(), GetPositionX(), GetPositionY(), GetPositionZ(), false);