@@ -1653,6 +1653,8 @@ void Map::transformLiquidsFinite(std::map<v3s16, MapBlock*> & modified_blocks)
1653
1653
1654
1654
u16 loop_max = g_settings->getU16 (" liquid_loop_max" );
1655
1655
1656
+ // if (m_transforming_liquid.size() > 0) errorstream << "Liquid queue size="<<m_transforming_liquid.size()<<std::endl;
1657
+
1656
1658
while (m_transforming_liquid.size () > 0 )
1657
1659
{
1658
1660
// This should be done here so that it is done when continue is used
@@ -1771,7 +1773,7 @@ void Map::transformLiquidsFinite(std::map<v3s16, MapBlock*> & modified_blocks)
1771
1773
}
1772
1774
1773
1775
// prevent lakes in air above unloaded blocks
1774
- if (liquid_levels[D_TOP] == 0 && (p0.Y > water_level || !fast_flood ) && neighbors[D_BOTTOM].n .getContent () == CONTENT_IGNORE) {
1776
+ if (liquid_levels[D_TOP] == 0 && (p0.Y > water_level) && neighbors[D_BOTTOM].n .getContent () == CONTENT_IGNORE && !(loopcount % 3 ) ) {
1775
1777
--total_level;
1776
1778
}
1777
1779
@@ -1794,11 +1796,16 @@ void Map::transformLiquidsFinite(std::map<v3s16, MapBlock*> & modified_blocks)
1794
1796
if (!neighbors[ii].l )
1795
1797
continue ;
1796
1798
liquid_levels_want[ii] = want_level;
1797
- if (liquid_levels_want[ii] < LIQUID_LEVEL_SOURCE && total_level > 0
1798
- && liquid_levels[ii] > liquid_levels_want[ii]
1799
- ) {
1800
- ++liquid_levels_want[ii];
1801
- --total_level;
1799
+ if (liquid_levels_want[ii] < LIQUID_LEVEL_SOURCE && total_level > 0 ) {
1800
+ if (loopcount % 3 || liquid_levels[ii] <= 0 ){
1801
+ if (liquid_levels[ii] > liquid_levels_want[ii]) {
1802
+ ++liquid_levels_want[ii];
1803
+ --total_level;
1804
+ }
1805
+ } else if (neighbors[ii].l > 0 ){
1806
+ ++liquid_levels_want[ii];
1807
+ --total_level;
1808
+ }
1802
1809
}
1803
1810
}
1804
1811
0 commit comments