From f61c3b437e5d6f3f32ec558576aa656aaa7dae5e Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 11 Jul 2024 15:27:49 +0200 Subject: send protocol version --- server/protocol/src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'server/protocol/src/lib.rs') diff --git a/server/protocol/src/lib.rs b/server/protocol/src/lib.rs index 2287633d..94bebf05 100644 --- a/server/protocol/src/lib.rs +++ b/server/protocol/src/lib.rs @@ -24,6 +24,8 @@ use std::{ pub use glam; +pub const VERSION: (u32, u32) = (1, 0); + #[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)] #[serde(transparent)] pub struct PlayerID(pub i64); @@ -106,6 +108,10 @@ pub enum Message { #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "snake_case", tag = "type")] pub enum PacketC { + Version { + minor: u32, + major: u32, + }, Init { id: PlayerID, }, -- cgit v1.2.3-70-g09d2