summaryrefslogtreecommitdiff
path: root/src/mapgen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapgen.cpp')
-rw-r--r--src/mapgen.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/mapgen.cpp b/src/mapgen.cpp
index d61e56819..3f83d2178 100644
--- a/src/mapgen.cpp
+++ b/src/mapgen.cpp
@@ -202,7 +202,7 @@ void Mapgen::updateLiquid(UniqueQueue<v3s16> *trans_liquid, v3s16 nmin, v3s16 nm
}
-void Mapgen::setLighting(v3s16 nmin, v3s16 nmax, u8 light)
+void Mapgen::setLighting(u8 light, v3s16 nmin, v3s16 nmax)
{
ScopeProfiler sp(g_profiler, "EmergeThread: mapgen lighting update", SPT_AVG);
VoxelArea a(nmin, nmax);
@@ -241,6 +241,19 @@ void Mapgen::lightSpread(VoxelArea &a, v3s16 p, u8 light)
}
+void Mapgen::calcLighting(v3s16 nmin, v3s16 nmax, v3s16 full_nmin, v3s16 full_nmax)
+{
+ ScopeProfiler sp(g_profiler, "EmergeThread: mapgen lighting update", SPT_AVG);
+ //TimeTaker t("updateLighting");
+
+ propagateSunlight(nmin, nmax);
+ spreadLight(full_nmin, full_nmax);
+
+ //printf("updateLighting: %dms\n", t.stop());
+}
+
+
+
void Mapgen::calcLighting(v3s16 nmin, v3s16 nmax)
{
ScopeProfiler sp(g_profiler, "EmergeThread: mapgen lighting update", SPT_AVG);