Skip to content

Commit 94f1e5d

Browse files
committedSep 17, 2015
Send proper block to old clients for swap_node calls
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.
1 parent dcbb953 commit 94f1e5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

Diff for: ‎src/server.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2102,7 +2102,7 @@ void Server::sendAddNode(v3s16 p, MapNode n, u16 ignore_id,
21022102
if (client->net_proto_version <= 21) {
21032103
// Old clients always clear metadata; fix it
21042104
// by sending the full block again.
2105-
client->SetBlockNotSent(p);
2105+
client->SetBlockNotSent(getNodeBlockPos(p));
21062106
}
21072107
}
21082108
}

0 commit comments

Comments
 (0)
Please sign in to comment.