added int npath param in FixupShortcuts()

This commit is contained in:
ikpil 2024-05-06 14:37:43 +09:00
parent b165a3afed
commit 741200b559
2 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ namespace DotRecast.Detour
// +-S-+-T-+ // +-S-+-T-+
// |:::| | <-- the step can end up in here, resulting U-turn path. // |:::| | <-- the step can end up in here, resulting U-turn path.
// +---+---+ // +---+---+
public static List<long> FixupShortcuts(List<long> path, DtNavMeshQuery navQuery) public static List<long> FixupShortcuts(List<long> path, int npath, DtNavMeshQuery navQuery)
{ {
if (path.Count < 3) if (path.Count < 3)
{ {

View File

@ -93,7 +93,7 @@ namespace DotRecast.Recast.Toolset.Tools
iterPos = result; iterPos = result;
pathIterPolys = DtPathUtils.MergeCorridorStartMoved(pathIterPolys, pathIterPolys.Count, MAX_POLYS, visited); pathIterPolys = DtPathUtils.MergeCorridorStartMoved(pathIterPolys, pathIterPolys.Count, MAX_POLYS, visited);
pathIterPolys = DtPathUtils.FixupShortcuts(pathIterPolys, navQuery); pathIterPolys = DtPathUtils.FixupShortcuts(pathIterPolys, pathIterPolys.Count, navQuery);
var status = navQuery.GetPolyHeight(pathIterPolys[0], result, out var h); var status = navQuery.GetPolyHeight(pathIterPolys[0], result, out var h);
if (status.Succeeded()) if (status.Succeeded())