Skip to content

Commit ecb024a

Browse files
committedJul 15, 2013
Fix lighting bug caused by disappearing lava
1 parent 4e5a459 commit ecb024a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎src/map.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -2186,6 +2186,7 @@ void Map::transformLiquids(std::map<v3s16, MapBlock*> & modified_blocks)
21862186
/*
21872187
update the current node
21882188
*/
2189+
MapNode n00 = n0;
21892190
//bool flow_down_enabled = (flowing_down && ((n0.param2 & LIQUID_FLOW_DOWN_MASK) != LIQUID_FLOW_DOWN_MASK));
21902191
if (nodemgr->get(new_node_content).liquid_type == LIQUID_FLOWING) {
21912192
// 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)
22232224
MapBlock *block = getBlockNoCreateNoEx(blockpos);
22242225
if(block != NULL) {
22252226
modified_blocks[blockpos] = block;
2226-
// If node emits light, MapBlock requires lighting update
2227-
if(nodemgr->get(n0).light_source != 0)
2227+
// If new or old node emits light, MapBlock requires lighting update
2228+
if(nodemgr->get(n0).light_source != 0 ||
2229+
nodemgr->get(n00).light_source != 0)
22282230
lighting_modified_blocks[block->getPos()] = block;
22292231
}
22302232

0 commit comments

Comments
 (0)
Please sign in to comment.