diff options
| author | untodesu <kirill@untode.su> | 2025-09-12 16:15:32 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-09-12 16:15:32 +0500 |
| commit | 522a7514012da86f7b9643179f0763746f3b232e (patch) | |
| tree | 7c4ea8f03b6778572d59784dc28b600e3f8f2268 /game/shared/protocol.hh | |
| parent | f210a86c1406ccc6dfd6f14181dd7a1274ee0de4 (diff) | |
| download | voxelius-522a7514012da86f7b9643179f0763746f3b232e.tar.bz2 voxelius-522a7514012da86f7b9643179f0763746f3b232e.zip | |
Protocol and versioning changes
Diffstat (limited to 'game/shared/protocol.hh')
| -rw-r--r-- | game/shared/protocol.hh | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/game/shared/protocol.hh b/game/shared/protocol.hh index 3133275..f0bdff6 100644 --- a/game/shared/protocol.hh +++ b/game/shared/protocol.hh @@ -14,7 +14,6 @@ constexpr static std::size_t MAX_USERNAME = 64; constexpr static std::size_t MAX_SOUNDNAME = 1024;
constexpr static std::uint16_t TICKRATE = 60;
constexpr static std::uint16_t PORT = 43103;
-constexpr static std::uint32_t VERSION = 15;
constexpr static std::uint8_t CHANNEL = 0;
} // namespace protocol
@@ -107,22 +106,26 @@ ENetPacket* make_dimension_info(const world::Dimension* dimension); } // namespace protocol::utils
struct protocol::StatusRequest final : public protocol::Base<0x0000> {
- std::uint32_t version;
+ std::uint32_t game_version_major; // renamed from 'version' in v16.x.x
};
struct protocol::StatusResponse final : public protocol::Base<0x0001> {
- std::uint32_t version;
+ std::uint32_t game_version_major; // renamed from 'version' in v16.x.x
std::uint16_t max_players;
std::uint16_t num_players;
std::string motd;
+ std::uint32_t game_version_minor { UINT32_MAX }; // added in v16.x.x
+ std::uint32_t game_version_patch { UINT32_MAX };
};
struct protocol::LoginRequest final : public protocol::Base<0x0002> {
- std::uint32_t version;
+ std::uint32_t game_version_major; // renamed from 'version' in v16.x.x
std::uint64_t voxel_registry_checksum;
std::uint64_t item_registry_checksum;
std::uint64_t password_hash;
std::string username;
+ std::uint32_t game_version_minor; // added in v16.x.x
+ std::uint32_t game_version_patch;
};
struct protocol::LoginResponse final : public protocol::Base<0x0003> {
|
