diff options
author | sfan5 <sfan5@live.de> | 2021-12-17 17:21:14 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2022-01-30 13:49:26 +0100 |
commit | a9bccb964f6c6ffe9d4f84922d9be640e4dd2f1e (patch) | |
tree | 03d526445df226332c0c376f52957524c14a0d93 /src/map.cpp | |
parent | 74a384de0acd52410269d160e94f1705cb4de300 (diff) | |
download | dragonfireclient-a9bccb964f6c6ffe9d4f84922d9be640e4dd2f1e.tar.xz |
Raise max mapgen limit constant to align with mapblock size
Diffstat (limited to 'src/map.cpp')
-rw-r--r-- | src/map.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/map.cpp b/src/map.cpp index 77031e17d..a11bbb96a 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -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 */ |