1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Map generation limit: Cache as 'const' not 'const static'

This commit is contained in:
paramat 2017-01-07 21:24:31 +00:00
parent ddcf8422a2
commit 8c1b4f298e
2 changed files with 3 additions and 3 deletions

View file

@ -2078,7 +2078,7 @@ ServerMapSector *ServerMap::createSector(v2s16 p2d)
Block minimum nodepos = blockpos * mapblocksize.
Block maximum nodepos = (blockpos + 1) * mapblocksize - 1.
*/
const static u16 map_gen_limit = MYMIN(MAX_MAP_GENERATION_LIMIT,
const u16 map_gen_limit = MYMIN(MAX_MAP_GENERATION_LIMIT,
g_settings->getU16("map_generation_limit"));
if (p2d.X * MAP_BLOCKSIZE < -map_gen_limit
|| (p2d.X + 1) * MAP_BLOCKSIZE - 1 > map_gen_limit