mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Optionally specify propagateSunlight area in calcLighting
This fixes the Mapgen V5 calcLighting segfault
This commit is contained in:
parent
00bca11f59
commit
7289d61e99
4 changed files with 39 additions and 21 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue