1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Update server min protocol version to v24 (#5411)

* Update server min protocol version to v24

It's based on @sfan5 stats. See https://kitsunemimi.pw/tmp/serverlist_stats_2017-03-17.txt

v24 was bumped 25/08/14 and 0.4.11 was released 25/12/14

* Drop protocol v23 and lesser code
This commit is contained in:
Loïc Blot 2017-03-19 08:44:29 +01:00 committed by GitHub
parent b8484ef24e
commit f8ad01ab7c
10 changed files with 115 additions and 298 deletions

View file

@ -2147,14 +2147,6 @@ void Server::sendAddNode(v3s16 p, MapNode n, u16 ignore_id,
if (client != 0) {
pkt << p << n.param0 << n.param1 << n.param2
<< (u8) (remove_metadata ? 0 : 1);
if (!remove_metadata) {
if (client->net_proto_version <= 21) {
// Old clients always clear metadata; fix it
// by sending the full block again.
client->SetBlockNotSent(getNodeBlockPos(p));
}
}
}
m_clients.unlock();
@ -2188,7 +2180,7 @@ void Server::SendBlockNoLock(u16 peer_id, MapBlock *block, u8 ver, u16 net_proto
std::ostringstream os(std::ios_base::binary);
block->serialize(os, ver, false);
block->serializeNetworkSpecific(os, net_proto_version);
block->serializeNetworkSpecific(os);
std::string s = os.str();
NetworkPacket pkt(TOCLIENT_BLOCKDATA, 2 + 2 + 2 + 2 + s.size(), peer_id);