Recast: explicitly init current tool

Tool states aren't always set, they are typically only set for the active tool if an option changed, but if nothing changed, then nothing will get updated (including the navmesh handle) so dangling pointers will be used. This makes sure everything gets initialized.
This commit is contained in:
Kawe Mazidjatari 2024-07-16 17:03:14 +02:00
parent b5eb23c956
commit 2888930893

View File

@ -405,6 +405,14 @@ void Editor_StaticTileMeshCommon::renderIntermediateTileMeshOptions()
m_navQuery->init(m_navMesh, 2048);
m_loadedNavMeshType = m_selectedNavMeshType;
if (m_tool)
{
m_tool->reset();
m_tool->init(this);
}
resetToolStates();
initToolStates(this);
}