Server: force block send of pointed_pos_under after predicted node place
authorKahrl <kahrl@gmx.net>
Sat, 27 Apr 2013 01:28:27 +0000 (03:28 +0200)
committerPilzAdam <pilzadam@minetest.net>
Fri, 3 May 2013 15:03:25 +0000 (17:03 +0200)
src/server.cpp

index d5e5051905a28fa2410b1178d26c1a113251d6f8..37bb7a35c174a785976e43486cfbda8f1487da99 100644 (file)
@@ -2980,12 +2980,16 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
                                playersao->setWieldedItem(item);
                        }
 
-                       // If item has node placement prediction, always send the above
-                       // node to make sure the client knows what exactly happened
+                       // If item has node placement prediction, always send the
+                       // blocks to make sure the client knows what exactly happened
                        if(item.getDefinition(m_itemdef).node_placement_prediction != ""){
                                RemoteClient *client = getClient(peer_id);
                                v3s16 blockpos = getNodeBlockPos(floatToInt(pointed_pos_above, BS));
                                client->SetBlockNotSent(blockpos);
+                               v3s16 blockpos2 = getNodeBlockPos(floatToInt(pointed_pos_under, BS));
+                               if(blockpos2 != blockpos){
+                                       client->SetBlockNotSent(blockpos2);
+                               }
                        }
                } // action == 3