From cfaa15895ad73ce3cef174f770d877059e9708e0 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sat, 15 Jan 2011 01:26:29 +0200 Subject: tweaking around, including mapgen, player speed in water, settings --- src/mapblock.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/mapblock.cpp') diff --git a/src/mapblock.cpp b/src/mapblock.cpp index 90ff05bd1..2d077121c 100644 --- a/src/mapblock.cpp +++ b/src/mapblock.cpp @@ -876,6 +876,7 @@ bool MapBlock::propagateSunlight(core::map & light_sources) { for(s16 z=0; z & light_sources) // No sunlight here //no_sunlight = true; } +#endif +#if 0 // Doesn't work; nothing gets light. + bool no_sunlight = true; + bool no_top_block = false; + // Check if node above block has sunlight + try{ + MapNode n = getNodeParent(v3s16(x, MAP_BLOCKSIZE, z)); + if(n.getLight(LIGHTBANK_DAY) == LIGHT_SUN) + { + no_sunlight = false; + } + } + catch(InvalidPositionException &e) + { + no_top_block = true; + } +#endif /*std::cout<<"("<