]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/map.cpp
Prevent world creation if the world already exists
[dragonfireclient.git] / src / map.cpp
index 824553b372b42db00d4389a723e21d819e7cde2e..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();