aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPilzAdam <pilzadam@minetest.net>2013-07-12 14:45:26 +0200
committerPilzAdam <pilzadam@minetest.net>2013-07-16 01:51:04 +0200
commitecb024af641065f152ce71ac13cde8b357394d0f (patch)
tree564c7195e15508f043dacf4f5048ac2340f39af3 /src
parent4e5a45952a4f40511029de8f9340f59ad6d97c44 (diff)
downloadminetest-ecb024af641065f152ce71ac13cde8b357394d0f.tar.gz
minetest-ecb024af641065f152ce71ac13cde8b357394d0f.tar.bz2
minetest-ecb024af641065f152ce71ac13cde8b357394d0f.zip
Fix lighting bug caused by disappearing lava
Diffstat (limited to 'src')
-rw-r--r--src/map.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map.cpp b/src/map.cpp
index f128aff6c..e458f3376 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -2186,6 +2186,7 @@ void Map::transformLiquids(std::map<v3s16, MapBlock*> & modified_blocks)
/*
update the current node
*/
+ MapNode n00 = n0;
//bool flow_down_enabled = (flowing_down && ((n0.param2 & LIQUID_FLOW_DOWN_MASK) != LIQUID_FLOW_DOWN_MASK));
if (nodemgr->get(new_node_content).liquid_type == LIQUID_FLOWING) {
// set level to last 3 bits, flowing down bit to 4th bit
@@ -2223,8 +2224,9 @@ void Map::transformLiquids(std::map<v3s16, MapBlock*> & modified_blocks)
MapBlock *block = getBlockNoCreateNoEx(blockpos);
if(block != NULL) {
modified_blocks[blockpos] = block;
- // If node emits light, MapBlock requires lighting update
- if(nodemgr->get(n0).light_source != 0)
+ // If new or old node emits light, MapBlock requires lighting update
+ if(nodemgr->get(n0).light_source != 0 ||
+ nodemgr->get(n00).light_source != 0)
lighting_modified_blocks[block->getPos()] = block;
}