From: Perttu Ahola Date: Mon, 15 Aug 2011 15:49:44 +0000 (+0300) Subject: small fix to transformLiquids X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=dc4ac0b96fc11d4620f04d6068e681ab793a5d92;p=zefram%2Fminetest%2Fminetest_engine.git small fix to transformLiquids --- diff --git a/src/map.cpp b/src/map.cpp index dc445926..9d67c828 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -1564,6 +1564,11 @@ void Map::transformLiquids(core::map & modified_blocks) while(m_transforming_liquid.size() != 0) { + // This should be done here so that it is done when continue is used + if(loopcount >= initial_size * 3) + break; + loopcount++; + /* Get a queued transforming liquid node */ @@ -1779,12 +1784,6 @@ void Map::transformLiquids(core::map & modified_blocks) } break; } - - loopcount++; - //if(loopcount >= 100000) - if(loopcount >= initial_size * 10) { - break; - } } //dstream<<"Map::transformLiquids(): loopcount="<