Skip to content
Snippets Groups Projects
Commit 94f1e5d9 authored by est31's avatar est31
Browse files

Send proper block to old clients for swap_node calls

The legacy code added in commit

d879a539 - "Add minetest.swap_node"

for sending the whole mapblock to older clients on the case of a node
modification with swap_node, had the problem that the block chosen to be
sent to the client was referenced with node coordinates and not with
block coordinates, resulting in getting the wrong block sent to the client.
parent dcbb9533
No related branches found
No related tags found
No related merge requests found
......@@ -2102,7 +2102,7 @@ void Server::sendAddNode(v3s16 p, MapNode n, u16 ignore_id,
if (client->net_proto_version <= 21) {
// Old clients always clear metadata; fix it
// by sending the full block again.
client->SetBlockNotSent(p);
client->SetBlockNotSent(getNodeBlockPos(p));
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment