mirror of
https://github.com/recastnavigation/recastnavigation.git
synced 2026-09-28 13:06:19 +00:00
**API CHANGED** Implemented issue 124. Detour API returns error codes.
This commit is contained in:
@@ -1079,14 +1079,14 @@ bool Sample_SoloMeshTiled::handleBuild()
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_navMesh->init(navData, navDataSize, DT_TILE_FREE_DATA))
|
||||
if (m_navMesh->init(navData, navDataSize, DT_TILE_FREE_DATA) != DT_SUCCESS)
|
||||
{
|
||||
dtFree(navData);
|
||||
m_ctx->log(RC_LOG_ERROR, "Could not init Detour navmesh");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_navQuery->init(m_navMesh, 2048))
|
||||
if (m_navQuery->init(m_navMesh, 2048) != DT_SUCCESS)
|
||||
{
|
||||
m_ctx->log(RC_LOG_ERROR, "Could not init Detour navmesh query");
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user