]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/map.cpp
Prevent world creation if the world already exists
[dragonfireclient.git] / src / map.cpp
index 8aa73efbe70d60a19994388fdbcb705dd0743fcb..39c6d292b3248569a0ffe382220250e24b01a440 100644 (file)
@@ -1468,8 +1468,8 @@ void Map::timerUpdate(float dtime, float unload_timeout,
                        MapBlock *block = (*i);
                        
                        block->incrementUsageTimer(dtime);
-                       
-                       if(block->getUsageTimer() > unload_timeout)
+
+                       if(block->refGet() == 0 && block->getUsageTimer() > unload_timeout)
                        {
                                v3s16 p = block->getPos();
 
@@ -1636,7 +1636,7 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & 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)
+               if(loopcount >= initial_size || loopcount >= 10000)
                        break;
                loopcount++;
 
@@ -1828,8 +1828,7 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
                // Find out whether there is a suspect for this action
                std::string suspect;
                if(m_gamedef->rollback()){
-                       // Max. 5 seconds ago
-                       suspect = m_gamedef->rollback()->getSuspect(p0, 5);
+                       suspect = m_gamedef->rollback()->getSuspect(p0, 83, 1);
                }
 
                if(!suspect.empty()){