diff options
author | kwolekr <kwolekr@minetest.net> | 2013-03-18 22:18:42 -0400 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2013-03-18 22:19:02 -0400 |
commit | 8f0d29f9316b3044c395ab03755273579f746400 (patch) | |
tree | a25ca2dc7a3e3c5ce90e45e78df1bd0ba1b3e19b /src | |
parent | d6026a5fee11722798ddcb1e4d0b5638f16ba9ce (diff) | |
download | minetest-8f0d29f9316b3044c395ab03755273579f746400.tar.gz minetest-8f0d29f9316b3044c395ab03755273579f746400.tar.bz2 minetest-8f0d29f9316b3044c395ab03755273579f746400.zip |
Fix Map::initBlockMake to actually use chunksize setting
Diffstat (limited to 'src')
-rw-r--r-- | src/map.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/map.cpp b/src/map.cpp index 8d8ce0d28..5d6b79fb0 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -2497,19 +2497,15 @@ bool ServerMap::initBlockMake(BlockMakeData *data, v3s16 blockpos) bool enable_mapgen_debug_info = m_emerge->mapgen_debug_info; EMERGE_DBG_OUT("initBlockMake(): " PP(blockpos) " - " PP(blockpos)); - //s16 chunksize = 3; - //v3s16 chunk_offset(-1,-1,-1); - //s16 chunksize = 4; - //v3s16 chunk_offset(-1,-1,-1); - s16 chunksize = 5; - v3s16 chunk_offset(-2,-2,-2); + s16 chunksize = m_mgparams->chunksize; + s16 coffset = -chunksize / 2; + v3s16 chunk_offset(coffset, coffset, coffset); v3s16 blockpos_div = getContainerPos(blockpos - chunk_offset, chunksize); v3s16 blockpos_min = blockpos_div * chunksize; v3s16 blockpos_max = blockpos_div * chunksize + v3s16(1,1,1)*(chunksize-1); blockpos_min += chunk_offset; blockpos_max += chunk_offset; - //v3s16 extra_borders(1,1,1); v3s16 extra_borders(1,1,1); // Do nothing if not inside limits (+-1 because of neighbors) |