mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: remove extraneous clamp for saltbits
Due to the change in 4ced95e2c111178a4127a663d95dc5c02e764d00, there are always 4 salt bits or less.
This commit is contained in:
parent
f8cac07da2
commit
b7bca8e15c
@ -255,8 +255,7 @@ dtStatus dtNavMesh::init(const dtNavMeshParams* params)
|
||||
#ifndef DT_POLYREF64
|
||||
m_tileBits = dtIlog2(dtNextPow2((unsigned int)params->maxTiles));
|
||||
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);
|
||||
m_saltBits = 32 - m_tileBits - m_polyBits;
|
||||
#endif
|
||||
|
||||
return DT_SUCCESS;
|
||||
|
@ -162,8 +162,7 @@ dtStatus dtTileCache::init(const dtTileCacheParams* params,
|
||||
|
||||
// Init ID generator values.
|
||||
m_tileBits = dtIlog2(dtNextPow2((unsigned int)m_params.maxTiles));
|
||||
// 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_saltBits = 32 - m_tileBits;
|
||||
|
||||
return DT_SUCCESS;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user