merged fix to decapitated trees; other bugs now exists
[oweals/minetest.git] / src / mapblock.cpp
index ead26dd1f8088ccaf8a4a2037ef5abb36f02eec7..49d215bf6d5b2f14a7a1eff78a4595533b9fd57d 100644 (file)
@@ -242,7 +242,12 @@ bool MapBlock::propagateSunlight(core::map<v3s16, bool> & light_sources,
                        // Check if node above block has sunlight
                        try{
                                MapNode n = getNodeParent(v3s16(x, MAP_BLOCKSIZE, z));
-                               if(n.getContent() == CONTENT_IGNORE || n.getLight(LIGHTBANK_DAY) != LIGHT_SUN)
+                               if(n.getContent() == CONTENT_IGNORE)
+                               {
+                                       // Trust heuristics
+                                       no_sunlight = is_underground;
+                               }
+                               else if(n.getLight(LIGHTBANK_DAY) != LIGHT_SUN)
                                {
                                        no_sunlight = true;
                                }