aboutsummaryrefslogtreecommitdiff
path: root/src/mapgen/mapgen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapgen/mapgen.cpp')
-rw-r--r--src/mapgen/mapgen.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mapgen/mapgen.cpp b/src/mapgen/mapgen.cpp
index 1f2ac491e..cca036b7b 100644
--- a/src/mapgen/mapgen.cpp
+++ b/src/mapgen/mapgen.cpp
@@ -453,9 +453,8 @@ void Mapgen::lightSpread(VoxelArea &a, std::queue<std::pair<v3s16, u8>> &queue,
!ndef->get(n).light_propagates)
return;
- // Since this recursive function only terminates when there is no light from
- // either bank left, we need to take the max of both banks into account for
- // the case where spreading has stopped for one light bank but not the other.
+ // MYMAX still needed here because we only exit early if both banks have
+ // nothing to propagate anymore.
light = MYMAX(light_day, n.param1 & 0x0F) |
MYMAX(light_night, n.param1 & 0xF0);
@@ -470,12 +469,9 @@ void Mapgen::calcLighting(v3s16 nmin, v3s16 nmax, v3s16 full_nmin, v3s16 full_nm
bool propagate_shadow)
{
ScopeProfiler sp(g_profiler, "EmergeThread: update lighting", SPT_AVG);
- //TimeTaker t("updateLighting");
propagateSunlight(nmin, nmax, propagate_shadow);
spreadLight(full_nmin, full_nmax);
-
- //printf("updateLighting: %dms\n", t.stop());
}