diff --git a/src/thirdparty/recast/Detour/Include/DetourNavMesh.h b/src/thirdparty/recast/Detour/Include/DetourNavMesh.h index 9b7bc2e1..b26e2ed9 100644 --- a/src/thirdparty/recast/Detour/Include/DetourNavMesh.h +++ b/src/thirdparty/recast/Detour/Include/DetourNavMesh.h @@ -136,6 +136,9 @@ static const unsigned int DT_OFFMESH_CON_BIDIR = 1; /// A value that determines the offset between the start pos and the ref pos in an off-mesh connection. static const float DT_OFFMESH_CON_REFPOS_OFFSET = 35.f; +/// A value that determines the maximum number of points describing the straight path result. +static const int DT_STRAIGHT_PATH_RESOLUTION = 5; + /// The maximum number of user defined area ids. /// @ingroup detour static const int DT_MAX_AREAS = 32; // <-- confirmed 32 see [r5apex_ds.exe + 0xf47dda] '-> test [rcx+80h], ax'. diff --git a/src/thirdparty/recast/Detour/Include/DetourNavMeshQuery.h b/src/thirdparty/recast/Detour/Include/DetourNavMeshQuery.h index 6dbe3b01..084f87a8 100644 --- a/src/thirdparty/recast/Detour/Include/DetourNavMeshQuery.h +++ b/src/thirdparty/recast/Detour/Include/DetourNavMeshQuery.h @@ -143,10 +143,34 @@ struct dtRaycastHit /// The maximum number of polygons the @p path array can hold. int maxPath; - /// The cost of the path until hit. + /// The cost of the path until hit. float pathCost; }; +/// Provides information about straight path generation +/// filled by dtNavMeshQuery::findStraightPath +/// @ingroup detour +struct dtStraightPathResult +{ + /// The number of points in the straight path. + int pathCount; + + /// The points describing the straight path. + float path[3][DT_STRAIGHT_PATH_RESOLUTION]; + + /// The array of polygon references that represent the path corridor. + dtPolyRef polys[DT_STRAIGHT_PATH_RESOLUTION]; + + /// The jumps describing each point. + unsigned char jumps[DT_STRAIGHT_PATH_RESOLUTION]; + + /// The flags describing each point. + unsigned char flags[DT_STRAIGHT_PATH_RESOLUTION]; + + /// Whether the end of the path is the goal destination. + bool pathEndIsGoal; +}; + /// Provides custom polygon query behavior. /// Used by dtNavMeshQuery::queryPolygons. /// @ingroup detour