diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mapgen.cpp | 10 | ||||
-rw-r--r-- | src/mapgen_singlenode.cpp | 3 | ||||
-rw-r--r-- | src/mapgen_v6.cpp | 3 | ||||
-rw-r--r-- | src/mapgen_v7.cpp | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/mapgen.cpp b/src/mapgen.cpp index b7711b01c..22488bc4c 100644 --- a/src/mapgen.cpp +++ b/src/mapgen.cpp @@ -241,8 +241,7 @@ void Mapgen::updateLiquid(UniqueQueue<v3s16> *trans_liquid, v3s16 nmin, v3s16 nm void Mapgen::setLighting(v3s16 nmin, v3s16 nmax, u8 light) { ScopeProfiler sp(g_profiler, "EmergeThread: mapgen lighting update", SPT_AVG); - VoxelArea a(nmin - v3s16(1,0,1) * MAP_BLOCKSIZE, - nmax + v3s16(1,0,1) * MAP_BLOCKSIZE); + VoxelArea a(nmin, nmax); for (int z = a.MinEdge.Z; z <= a.MaxEdge.Z; z++) { for (int y = a.MinEdge.Y; y <= a.MaxEdge.Y; y++) { @@ -278,8 +277,7 @@ void Mapgen::lightSpread(VoxelArea &a, v3s16 p, u8 light) { void Mapgen::calcLighting(v3s16 nmin, v3s16 nmax) { - VoxelArea a(nmin - v3s16(1,0,1) * MAP_BLOCKSIZE, - nmax + v3s16(1,0,1) * MAP_BLOCKSIZE); + VoxelArea a(nmin, nmax); bool block_is_underground = (water_level >= nmax.Y); ScopeProfiler sp(g_profiler, "EmergeThread: mapgen lighting update", SPT_AVG); @@ -342,9 +340,7 @@ void Mapgen::calcLighting(v3s16 nmin, v3s16 nmax) { void Mapgen::calcLightingOld(v3s16 nmin, v3s16 nmax) { enum LightBank banks[2] = {LIGHTBANK_DAY, LIGHTBANK_NIGHT}; - - VoxelArea a(nmin - v3s16(1,0,1) * MAP_BLOCKSIZE, - nmax + v3s16(1,0,1) * MAP_BLOCKSIZE); + VoxelArea a(nmin, nmax); bool block_is_underground = (water_level > nmax.Y); bool sunlight = !block_is_underground; diff --git a/src/mapgen_singlenode.cpp b/src/mapgen_singlenode.cpp index 22b756abb..f05ddd2f4 100644 --- a/src/mapgen_singlenode.cpp +++ b/src/mapgen_singlenode.cpp @@ -91,7 +91,8 @@ void MapgenSinglenode::makeChunk(BlockMakeData *data) { updateLiquid(&data->transforming_liquid, node_min, node_max); // Calculate lighting - calcLighting(node_min, node_max); + calcLighting(node_min - v3s16(1, 0, 1) * MAP_BLOCKSIZE, + node_max + v3s16(1, 0, 1) * MAP_BLOCKSIZE); this->generating = false; } diff --git a/src/mapgen_v6.cpp b/src/mapgen_v6.cpp index 275d4b78f..4a037bb85 100644 --- a/src/mapgen_v6.cpp +++ b/src/mapgen_v6.cpp @@ -471,7 +471,8 @@ void MapgenV6::makeChunk(BlockMakeData *data) { } // Calculate lighting - calcLighting(node_min, node_max); + calcLighting(node_min - v3s16(1, 1, 1) * MAP_BLOCKSIZE, + node_max + v3s16(1, 0, 1) * MAP_BLOCKSIZE); this->generating = false; } diff --git a/src/mapgen_v7.cpp b/src/mapgen_v7.cpp index af453c2ec..6aecfe310 100644 --- a/src/mapgen_v7.cpp +++ b/src/mapgen_v7.cpp @@ -186,7 +186,9 @@ void MapgenV7::makeChunk(BlockMakeData *data) { //printf("makeChunk: %dms\n", t.stop()); updateLiquid(&data->transforming_liquid, full_node_min, full_node_max); - calcLighting(node_min, node_max); + + calcLighting(node_min - v3s16(1, 0, 1) * MAP_BLOCKSIZE, + node_max + v3s16(1, 0, 1) * MAP_BLOCKSIZE); //setLighting(node_min, node_max, 0xFF); this->generating = false; |