From 49073ba2c34dfd8e286865ed2d108a4ec1eb3e3c Mon Sep 17 00:00:00 2001 From: paramat Date: Wed, 2 Dec 2015 03:28:03 +0000 Subject: Mapgen: Add propagate_shadow bool to calcLighting To terminate unwanted shadows from floatlands or realms above Also add to LuaVoxelManip calc_lighting for use in mapgen mods Remove the 2 argument calcLighting, mapgens now use the 5 argument form to specify the volumes for propagateSunlight and spreadLight In mgsinglenode replace calcLighting with setLighting and clean-up use of tabs and spaces --- src/mapgen_v6.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mapgen_v6.cpp') diff --git a/src/mapgen_v6.cpp b/src/mapgen_v6.cpp index 3b5915bd1..0a9f80dc9 100644 --- a/src/mapgen_v6.cpp +++ b/src/mapgen_v6.cpp @@ -593,7 +593,9 @@ void MapgenV6::makeChunk(BlockMakeData *data) // Calculate lighting if (flags & MG_LIGHT) - calcLighting(node_min, node_max); + calcLighting(node_min - v3s16(1, 1, 1) * MAP_BLOCKSIZE, + node_max + v3s16(1, 0, 1) * MAP_BLOCKSIZE, + full_node_min, full_node_max); this->generating = false; } -- cgit v1.2.3