DETOUR return status codes changed, check blog! Changed Detour status codes to be bitfields which describes the highlevel status plus some details about the failure or quality of the result.

This commit is contained in:
Mikko Mononen
2010-11-26 11:56:34 +00:00
parent 7fbcfa9c4b
commit 08741e894c
11 changed files with 1011 additions and 856 deletions

View File

@@ -640,14 +640,18 @@ bool Sample_SoloMeshSimple::handleBuild()
return false;
}
if (m_navMesh->init(navData, navDataSize, DT_TILE_FREE_DATA) != DT_SUCCESS)
dtStatus status;
status = m_navMesh->init(navData, navDataSize, DT_TILE_FREE_DATA);
if (dtStatusFailed(status))
{
dtFree(navData);
m_ctx->log(RC_LOG_ERROR, "Could not init Detour navmesh");
return false;
}
if (m_navQuery->init(m_navMesh, 2048) != DT_SUCCESS)
status = m_navQuery->init(m_navMesh, 2048);
if (dtStatusFailed(status))
{
m_ctx->log(RC_LOG_ERROR, "Could not init Detour navmesh query");
return false;