mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: fix crash caused by traverse link table render selector
Out of bounds access caused when a navmesh is loaded with a smaller amount of tables than currently selected. Always reset the selector when loading/building.
This commit is contained in:
parent
a3e4191cae
commit
d4c3eb8dcc
@ -1341,6 +1341,7 @@ bool Editor::loadNavMesh(const char* path, const bool fullPath)
|
||||
m_navQuery->init(m_navMesh, 2048);
|
||||
|
||||
m_loadedNavMeshType = m_selectedNavMeshType;
|
||||
m_traverseLinkParams.traverseAnimType = -2;
|
||||
|
||||
if (m_tool)
|
||||
{
|
||||
|
@ -472,6 +472,7 @@ bool Editor_TileMesh::handleBuild()
|
||||
}
|
||||
|
||||
m_loadedNavMeshType = m_selectedNavMeshType;
|
||||
m_traverseLinkParams.traverseAnimType = -2;
|
||||
|
||||
dtNavMeshParams params;
|
||||
rdVcopy(params.orig, m_geom->getNavMeshBoundsMin());
|
||||
|
Loading…
x
Reference in New Issue
Block a user