From 741200b5592043b67bd0cded92a0ddfd33e46a33 Mon Sep 17 00:00:00 2001 From: ikpil Date: Mon, 6 May 2024 14:37:43 +0900 Subject: [PATCH] added int npath param in FixupShortcuts() --- src/DotRecast.Detour/DtPathUtils.cs | 2 +- src/DotRecast.Recast.Toolset/Tools/RcTestNavMeshTool.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DotRecast.Detour/DtPathUtils.cs b/src/DotRecast.Detour/DtPathUtils.cs index e5e2dcc..f1c37ae 100644 --- a/src/DotRecast.Detour/DtPathUtils.cs +++ b/src/DotRecast.Detour/DtPathUtils.cs @@ -88,7 +88,7 @@ namespace DotRecast.Detour // +-S-+-T-+ // |:::| | <-- the step can end up in here, resulting U-turn path. // +---+---+ - public static List FixupShortcuts(List path, DtNavMeshQuery navQuery) + public static List FixupShortcuts(List path, int npath, DtNavMeshQuery navQuery) { if (path.Count < 3) { diff --git a/src/DotRecast.Recast.Toolset/Tools/RcTestNavMeshTool.cs b/src/DotRecast.Recast.Toolset/Tools/RcTestNavMeshTool.cs index a9c9b62..1c77eea 100644 --- a/src/DotRecast.Recast.Toolset/Tools/RcTestNavMeshTool.cs +++ b/src/DotRecast.Recast.Toolset/Tools/RcTestNavMeshTool.cs @@ -93,7 +93,7 @@ namespace DotRecast.Recast.Toolset.Tools iterPos = result; 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); if (status.Succeeded())