diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2011-08-16 18:05:28 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2011-08-16 18:05:28 +0200 |
commit | 56e9f97294ebc39967a3d029fe07e7c74849c1a1 (patch) | |
tree | 8919328f3585f37d144bb826feee970c706de157 | |
parent | 774faf4e85c08bb4c78404fb0af4eebfad5720cb (diff) | |
download | minetest-56e9f97294ebc39967a3d029fe07e7c74849c1a1.tar.gz minetest-56e9f97294ebc39967a3d029fe07e7c74849c1a1.tar.bz2 minetest-56e9f97294ebc39967a3d029fe07e7c74849c1a1.zip |
Make sure all neighbors of changed fluids are activated
This should fix the remaining cases of fluid not advancing or not
retreating.
-rw-r--r-- | src/map.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/map.cpp b/src/map.cpp index 17bca82db..3aff00c94 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -1743,6 +1743,7 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks) */ switch (content_features(n0.getContent()).liquid_type) { case LIQUID_SOURCE: + case LIQUID_FLOWING: // make sure source flows into all neighboring nodes for (u16 i = 0; i < num_flows; i++) if (flows[i].t != NEIGHBOR_UPPER) @@ -1756,19 +1757,6 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks) for (u16 i = 0; i < num_flows; i++) m_transforming_liquid.push_back(flows[i].p); break; - case LIQUID_FLOWING: - for (u16 i = 0; i < num_flows; i++) { - u8 flow_level = (flows[i].n.param2 & LIQUID_LEVEL_MASK); - // liquid_level is still the ORIGINAL level of this node. - if (flows[i].t != NEIGHBOR_UPPER && ((flow_level < liquid_level || flow_level < new_node_level) || - flow_down_enabled)) - m_transforming_liquid.push_back(flows[i].p); - } - for (u16 i = 0; i < num_airs; i++) { - if (airs[i].t != NEIGHBOR_UPPER && (airs[i].t == NEIGHBOR_LOWER || new_node_level > 0)) - m_transforming_liquid.push_back(airs[i].p); - } - break; } } //dstream<<"Map::transformLiquids(): loopcount="<<loopcount<<std::endl; |