summaryrefslogtreecommitdiff
path: root/src/mapblock.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-07-21 17:00:08 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-07-21 17:00:08 +0300
commit52ad5944c080e858c49267c49703ec79b18e120f (patch)
tree3bf32cb5ca7735762e2f36c80dc1106c01748d02 /src/mapblock.cpp
parent74ef5b8a42aacaeef4bffeef59a7fddb3e14c17c (diff)
downloadminetest-52ad5944c080e858c49267c49703ec79b18e120f.tar.gz
minetest-52ad5944c080e858c49267c49703ec79b18e120f.tar.bz2
minetest-52ad5944c080e858c49267c49703ec79b18e120f.zip
Attempt to fix the big bug. Now server either stops sending map or mapgen starts generating CONTENT_IGNORE.
Diffstat (limited to 'src/mapblock.cpp')
-rw-r--r--src/mapblock.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mapblock.cpp b/src/mapblock.cpp
index 647a17756..cdbd54525 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.d == CONTENT_IGNORE || n.getLight(LIGHTBANK_DAY) != LIGHT_SUN)
+ if(n.d == CONTENT_IGNORE)
+ {
+ // Trust heuristics
+ no_sunlight = is_underground;
+ }
+ else if(n.getLight(LIGHTBANK_DAY) != LIGHT_SUN)
{
no_sunlight = true;
}