Skip to content

Commit

Permalink
Send proper block to old clients for swap_node calls
Browse files Browse the repository at this point in the history
The legacy code added in commit

d879a53 - "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.
  • Loading branch information
est31 committed Sep 17, 2015
1 parent dcbb953 commit 94f1e5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
}
Expand Down

0 comments on commit 94f1e5d

Please sign in to comment.