diff options
author | kwolekr <kwolekr@minetest.net> | 2013-04-07 02:26:46 -0400 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2013-04-07 02:26:46 -0400 |
commit | 96e2931c5c154262566359495d4a0b8515376947 (patch) | |
tree | 02b2f587b6cdce36dcdd90d508a632d8d9874bb4 /src/mapgen.cpp | |
parent | 5961106f9ffd9e9a2bc23e4bd700f6ce07505c9a (diff) | |
download | minetest-96e2931c5c154262566359495d4a0b8515376947.tar.gz minetest-96e2931c5c154262566359495d4a0b8515376947.tar.bz2 minetest-96e2931c5c154262566359495d4a0b8515376947.zip |
Fix black tree leaves, reduce above-ground cave shadows
Diffstat (limited to 'src/mapgen.cpp')
-rw-r--r-- | src/mapgen.cpp | 10 |
1 files changed, 3 insertions, 7 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; |