diff options
author | Kahrl <kahrl@gmx.net> | 2013-04-27 03:28:27 +0200 |
---|---|---|
committer | PilzAdam <pilzadam@minetest.net> | 2013-05-03 17:03:25 +0200 |
commit | be4cc306a54375f362ae13f9e4111ea11a739837 (patch) | |
tree | 75e5967944d6c752ee9bc89fa4ac431f13eed78a | |
parent | 0deb68d81cd5ebbd24671702be940e1c871e43f2 (diff) | |
download | minetest-be4cc306a54375f362ae13f9e4111ea11a739837.tar.gz minetest-be4cc306a54375f362ae13f9e4111ea11a739837.tar.bz2 minetest-be4cc306a54375f362ae13f9e4111ea11a739837.zip |
Server: force block send of pointed_pos_under after predicted node place
-rw-r--r-- | src/server.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/server.cpp b/src/server.cpp index d5e505190..37bb7a35c 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -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 |