diff --git a/src/naveditor/Editor_TileMesh.cpp b/src/naveditor/Editor_TileMesh.cpp index cfd48b47..c7906d47 100644 --- a/src/naveditor/Editor_TileMesh.cpp +++ b/src/naveditor/Editor_TileMesh.cpp @@ -236,7 +236,7 @@ void Editor_TileMesh::handleSettings() m_buildAll = !m_buildAll; imguiLabel("Tiling"); - imguiSlider("TileSize", &m_tileSize, 16.0f, 1024.0f, 16.0f); + imguiSlider("TileSize", &m_tileSize, 8.0f, 1024.0f, 8.0f); if (m_geom) { @@ -252,11 +252,11 @@ void Editor_TileMesh::handleSettings() imguiValue(text); snprintf(text, 64, "Tile Sizes %g x %g", tw*m_cellSize, th*m_cellSize); imguiValue(text); - // Max tiles and max polys affect how the tile IDs are caculated. - // There are 22 bits available for identifying a tile and a polygon. - int tileBits = rcMin((int)ilog2(nextPow2(tw*th)), 28); - if (tileBits > 28) tileBits = 28; - int polyBits = 22 - tileBits; + // Max tiles and max polys affect how the tile IDs are calculated. + // There are 28 bits available for identifying a tile and a polygon. + int tileBits = rcMin((int)ilog2(nextPow2(tw*th)), 16); + if (tileBits > 16) tileBits = 16; + int polyBits = 28 - tileBits; m_maxTiles = 1 << tileBits; m_maxPolysPerTile = 1 << polyBits; snprintf(text, 64, "Max Tiles %d", m_maxTiles); diff --git a/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp b/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp index 2493d030..5b2eadd5 100644 --- a/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp +++ b/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp @@ -257,10 +257,6 @@ dtStatus dtNavMesh::init(const dtNavMeshParams* params) m_polyBits = dtIlog2(dtNextPow2((unsigned int)params->maxPolys)); // Only allow 31 salt bits, since the salt mask is calculated using 32bit uint and it will overflow. m_saltBits = dtMin((unsigned int)31, 32 - m_tileBits - m_polyBits); - - // NOTE[ AMOS ]: this check doesn't exist in R5! - if (m_saltBits < 10) - return DT_FAILURE | DT_INVALID_PARAM; #endif return DT_SUCCESS; diff --git a/src/thirdparty/recast/DetourTileCache/Source/DetourTileCache.cpp b/src/thirdparty/recast/DetourTileCache/Source/DetourTileCache.cpp index 59174ff7..070961aa 100644 --- a/src/thirdparty/recast/DetourTileCache/Source/DetourTileCache.cpp +++ b/src/thirdparty/recast/DetourTileCache/Source/DetourTileCache.cpp @@ -165,10 +165,6 @@ dtStatus dtTileCache::init(const dtTileCacheParams* params, // Only allow 31 salt bits, since the salt mask is calculated using 32bit uint and it will overflow. m_saltBits = dtMin((unsigned int)31, 32 - m_tileBits); - // NOTE[ AMOS ]: this check doesn't exist in dtNavMesh::init for R5, so it probably also doesn't exist here! - if (m_saltBits < 10) - return DT_FAILURE | DT_INVALID_PARAM; - return DT_SUCCESS; }