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

Raise max mapgen limit constant to align with mapblock size

This commit is contained in:
sfan5 2021-12-17 17:21:14 +01:00
parent 74a384de0a
commit a9bccb964f
9 changed files with 77 additions and 15 deletions

View file

@ -1444,11 +1444,7 @@ MapSector *ServerMap::createSector(v2s16 p2d)
/*
Do not create over max mapgen limit
*/
const s16 max_limit_bp = MAX_MAP_GENERATION_LIMIT / MAP_BLOCKSIZE;
if (p2d.X < -max_limit_bp ||
p2d.X > max_limit_bp ||
p2d.Y < -max_limit_bp ||
p2d.Y > max_limit_bp)
if (blockpos_over_max_limit(v3s16(p2d.X, 0, p2d.Y)))
throw InvalidPositionException("createSector(): pos. over max mapgen limit");
/*
@ -1457,9 +1453,6 @@ MapSector *ServerMap::createSector(v2s16 p2d)
sector = new MapSector(this, p2d, m_gamedef);
// Sector position on map in nodes
//v2s16 nodepos2d = p2d * MAP_BLOCKSIZE;
/*
Insert to container
*/