feat(Core/Travel): Enable PathGenerator slope check on chained probe

This commit is contained in:
bash 2026-05-08 10:34:40 +02:00
parent 4c63c183f2
commit c8ca028ebe

View File

@ -730,6 +730,14 @@ std::vector<WorldPosition> 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);