diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-07-24 11:39:13 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-07-24 11:39:13 +0300 |
commit | 112b85d0fb97b896da977a3915dab73015681896 (patch) | |
tree | 2a33893b0a12e6462933b22ddb34f4097ad45285 /src/mapblock.cpp | |
parent | 8d84086f35b714906be013d536c42cf9c3dd4828 (diff) | |
parent | 52ad5944c080e858c49267c49703ec79b18e120f (diff) | |
download | minetest-112b85d0fb97b896da977a3915dab73015681896.tar.gz minetest-112b85d0fb97b896da977a3915dab73015681896.tar.bz2 minetest-112b85d0fb97b896da977a3915dab73015681896.zip |
merged fix to decapitated trees; other bugs now exists
Diffstat (limited to 'src/mapblock.cpp')
-rw-r--r-- | src/mapblock.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mapblock.cpp b/src/mapblock.cpp index ead26dd1f..49d215bf6 100644 --- a/src/mapblock.cpp +++ b/src/mapblock.cpp @@ -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; } |