mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: properly flag off-mesh connection polygons
MSET 7 or higher needs proper off-mesh connection flags.
This commit is contained in:
parent
30570981e1
commit
b2d0db40ef
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user