1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Simplify TOSERVER_INIT and TOCLIENT_HELLO

- Network compression support was never added.
- Client hasn't used the returned playername since at least 0.4-stable.
This commit is contained in:
red-001 2024-09-02 20:50:43 +01:00 committed by GitHub
parent 2bc9dc54ff
commit d5d8fb629b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 13 additions and 39 deletions

View file

@ -1141,10 +1141,7 @@ void Client::sendInit(const std::string &playerName)
{
NetworkPacket pkt(TOSERVER_INIT, 1 + 2 + 2 + (1 + playerName.size()));
// we don't support network compression yet
u16 supp_comp_modes = NETPROTO_COMPRESSION_NONE;
pkt << (u8) SER_FMT_VER_HIGHEST_READ << (u16) supp_comp_modes;
pkt << (u8) SER_FMT_VER_HIGHEST_READ << (u16) 0;
pkt << (u16) CLIENT_PROTOCOL_VERSION_MIN << (u16) CLIENT_PROTOCOL_VERSION_MAX;
pkt << playerName;