Fixed a bug of server not reloading unloaded blocks when player builds or digs on...
authorPerttu Ahola <celeron55@gmail.com>
Tue, 25 Jan 2011 07:29:59 +0000 (09:29 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Tue, 25 Jan 2011 07:29:59 +0000 (09:29 +0200)
src/server.cpp

index 716ff77c6bfa6f1311e78d10c23003599f235683..505e9730f139c555d2763c586168d35f97c9071a 100644 (file)
@@ -1966,8 +1966,11 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
                        }
                        catch(InvalidPositionException &e)
                        {
-                               derr_server<<"Server: Not finishing digging: Node not found"
+                               derr_server<<"Server: Not finishing digging: Node not found."
+                                               <<" Adding block to emerge queue."
                                                <<std::endl;
+                               m_emerge_queue.addBlock(peer_id,
+                                               getNodeBlockPos(p_over), BLOCK_EMERGE_FLAG_FROMDISK);
                                return;
                        }
                        
@@ -2117,7 +2120,10 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
                                catch(InvalidPositionException &e)
                                {
                                        derr_server<<"Server: Ignoring ADDNODE: Node not found"
+                                                       <<" Adding block to emerge queue."
                                                        <<std::endl;
+                                       m_emerge_queue.addBlock(peer_id,
+                                                       getNodeBlockPos(p_over), BLOCK_EMERGE_FLAG_FROMDISK);
                                        return;
                                }