From 218da36b4f963a5dfcd619d543cb95c5c196d214 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sun, 11 Aug 2024 01:30:59 +0200 Subject: update movement in protocol and all clients --- server/protocol/src/lib.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'server/protocol/src/lib.rs') diff --git a/server/protocol/src/lib.rs b/server/protocol/src/lib.rs index 1a4e41a9..8f8e9784 100644 --- a/server/protocol/src/lib.rs +++ b/server/protocol/src/lib.rs @@ -30,7 +30,7 @@ pub use glam; pub mod movement; -pub const VERSION: (u32, u32) = (3, 0); +pub const VERSION: (u32, u32) = (4, 0); pub const BINCODE_CONFIG: Configuration> = standard().with_limit(); @@ -94,8 +94,8 @@ pub enum PacketS { Movement { player: PlayerID, #[bincode(with_serde)] - direction: Vec2, - boosting: bool, + dir: Vec2, + boost: bool, #[bincode(with_serde)] pos: Option, }, @@ -155,12 +155,14 @@ pub enum PacketC { RemovePlayer { id: PlayerID, }, - Position { + Movement { player: PlayerID, #[bincode(with_serde)] pos: Vec2, rot: f32, - boosting: bool, + #[bincode(with_serde)] + dir: Vec2, + boost: bool, }, MoveItem { from: ItemLocation, -- cgit v1.2.3-70-g09d2