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.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/mapgen.h') diff --git a/src/mapgen.h b/src/mapgen.h index 31cf7dc11..9bb7d03b8 100644 --- a/src/mapgen.h +++ b/src/mapgen.h @@ -173,12 +173,9 @@ public: void setLighting(u8 light, v3s16 nmin, v3s16 nmax); void lightSpread(VoxelArea &a, v3s16 p, u8 light); - - void calcLighting(v3s16 nmin, v3s16 nmax); - void calcLighting(v3s16 nmin, v3s16 nmax, - v3s16 full_nmin, v3s16 full_nmax); - - void propagateSunlight(v3s16 nmin, v3s16 nmax); + void calcLighting(v3s16 nmin, v3s16 nmax, v3s16 full_nmin, v3s16 full_nmax, + bool propagate_shadow = true); + void propagateSunlight(v3s16 nmin, v3s16 nmax, bool propagate_shadow); void spreadLight(v3s16 nmin, v3s16 nmax); virtual void makeChunk(BlockMakeData *data) {} -- cgit v1.2.3