diff --git a/src/naveditor/OffMeshConnectionTool.cpp b/src/naveditor/OffMeshConnectionTool.cpp index da00862b..d0e252ab 100644 --- a/src/naveditor/OffMeshConnectionTool.cpp +++ b/src/naveditor/OffMeshConnectionTool.cpp @@ -128,8 +128,13 @@ void OffMeshConnectionTool::handleClick(const float* /*s*/, const float* p, bool } else { - const unsigned char area = EDITOR_POLYAREA_JUMP; - const unsigned short flags = EDITOR_POLYFLAGS_WALK; + const unsigned char area = DT_POLYAREA_JUMP; + const unsigned short flags = DT_POLYFLAGS_WALK +#if DT_NAVMESH_SET_VERSION >= 7 + | DT_POLYFLAGS_JUMP; +#else + ; +#endif; geom->addOffMeshConnection(m_hitPos, p, m_radius, m_bidir ? 1 : 0, (unsigned char)m_traverseType, m_invertVertexLookupOrder ? 1 : 0, area, flags); m_hitPosSet = false; diff --git a/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp b/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp index 3c3b610c..2f9bf166 100644 --- a/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp +++ b/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp @@ -672,7 +672,11 @@ dtStatus dtNavMesh::connectOffMeshLinks(const dtTileRef tileRef) return DT_FAILURE | DT_OUT_OF_MEMORY; } - // Off-mesh links have been established, break out entirely. +#if DT_NAVMESH_SET_VERSION >= 7 + // Off-mesh link is fully linked, mark it. + conPoly->flags |= DT_POLYFLAGS_JUMP_LINKED; +#endif + // All links have been established, break out entirely. breakOut = true; break; }