mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +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:
parent
6c324cb871
commit
c175046d30
11 changed files with 46 additions and 49 deletions
|
@ -7,7 +7,6 @@
|
|||
#include "irr_v3d.h" // for irrlicht datatypes
|
||||
|
||||
#include "constants.h"
|
||||
#include "serialization.h" // for SER_FMT_VER_INVALID
|
||||
#include "network/networkpacket.h"
|
||||
#include "network/networkprotocol.h"
|
||||
#include "network/address.h"
|
||||
|
@ -219,7 +218,7 @@ public:
|
|||
// Also, the client must be moved to some other container.
|
||||
session_t peer_id = PEER_ID_INEXISTENT;
|
||||
// The serialization version to use with the client
|
||||
u8 serialization_version = SER_FMT_VER_INVALID;
|
||||
u8 serialization_version;
|
||||
//
|
||||
u16 net_proto_version = 0;
|
||||
|
||||
|
@ -333,7 +332,7 @@ public:
|
|||
|
||||
private:
|
||||
// Version is stored in here after INIT before INIT2
|
||||
u8 m_pending_serialization_version = SER_FMT_VER_INVALID;
|
||||
u8 m_pending_serialization_version;
|
||||
|
||||
/* current state of client */
|
||||
ClientState m_state = CS_Created;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue