Recast: fix initialization for traverse link draw parameters

m_traverseLinkDrawParams.dynamicOffset was never initialized.
This commit is contained in:
Kawe Mazidjatari 2024-11-01 21:00:59 +01:00
parent b47b52dd08
commit a218cef231

View File

@ -273,8 +273,6 @@ void Editor::resetCommonSettings()
m_tileSize = 64;
m_cellSize = 8.0f;
m_cellHeight = 9.0f;
m_traverseLinkDrawParams.dynamicOffset = m_traverseRayDynamicOffset;
m_traverseLinkDrawParams.cellHeight = m_cellHeight;
// todo(amos): check if this applies for all hulls, and check if this is the
// actual value used by the game. This seems to generate slopes very close
@ -306,6 +304,10 @@ void Editor::resetCommonSettings()
m_detailSampleMaxError = 2.0f;
m_partitionType = EDITOR_PARTITION_WATERSHED;
m_traverseLinkDrawParams.cellHeight = m_cellHeight;
m_traverseLinkDrawParams.extraOffset = m_traverseRayExtraOffset;
m_traverseLinkDrawParams.dynamicOffset = m_traverseRayDynamicOffset;
initTraverseMasks();
initTraverseTableParams();
}