Make map generator more responsive
authorPerttu Ahola <celeron55@gmail.com>
Fri, 25 Nov 2011 16:17:59 +0000 (18:17 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Tue, 29 Nov 2011 17:13:51 +0000 (19:13 +0200)
src/mapgen.cpp
src/server.cpp

index 4688a87c48a0af80ac6431b2cd4eb3ca050d0b78..f1e109b2d3637b977eeea403a95736532129e049 100644 (file)
@@ -1534,7 +1534,7 @@ void make_block(BlockMakeData *data)
        // Maximum amount of ground above the bottom of the central block
        s16 maximum_ground_depth = maximum_groundlevel - node_min.Y;
 
-       #if 0
+       #if 1
        /*
                Special case for high air or water: Just fill with air and water.
        */
index 100497b6137a1fb99c3626eab9eed620bd8f6636..83412abfb56e6d1136c3d3c172cc934234c18c23 100644 (file)
@@ -688,7 +688,11 @@ void RemoteClient::GetNextBlocks(Server *server, float dtime,
                                //if(server->m_emerge_queue.peerItemCount(peer_id) < 1)
                                // Allow two blocks in queue per client
                                //if(server->m_emerge_queue.peerItemCount(peer_id) < 2)
-                               if(server->m_emerge_queue.peerItemCount(peer_id) < 25)
+                               s32 max_emerge = 25;
+                               // Make it more responsive when needing to generate stuff
+                               if(surely_not_found_on_disk)
+                                       max_emerge = 5;
+                               if(server->m_emerge_queue.peerItemCount(peer_id) < max_emerge)
                                {
                                        //infostream<<"Adding block to emerge queue"<<std::endl;