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

Network: Fix serialization version checks (#15477)

This fixes some incorrect assumptions that the read and write version ranges are identical - whereas they're in fact not.
This commit is contained in:
SmallJoker 2024-11-27 18:39:57 +01:00 committed by GitHub
parent 6c324cb871
commit c175046d30
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 46 additions and 49 deletions

View file

@ -8,6 +8,7 @@
#include "network/connection.h"
#include "network/serveropcodes.h"
#include "remoteplayer.h"
#include "serialization.h" // SER_FMT_VER_INVALID
#include "settings.h"
#include "mapblock.h"
#include "serverenvironment.h"
@ -51,6 +52,8 @@ std::string ClientInterface::state2Name(ClientState state)
}
RemoteClient::RemoteClient() :
serialization_version(SER_FMT_VER_INVALID),
m_pending_serialization_version(SER_FMT_VER_INVALID),
m_max_simul_sends(g_settings->getU16("max_simultaneous_block_sends_per_client")),
m_min_time_from_building(
g_settings->getFloat("full_block_send_enable_min_time_from_building")),