forked from mirror/DotRecast
added int npath param in FixupShortcuts()
This commit is contained in:
parent
b165a3afed
commit
741200b559
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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())
|
||||||
|
|
Loading…
Reference in New Issue