diff options
author | metamuffin <metamuffin@disroot.org> | 2024-08-11 01:30:59 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-08-11 01:35:05 +0200 |
commit | 218da36b4f963a5dfcd619d543cb95c5c196d214 (patch) | |
tree | 244ecd10f4ca3d9798cedf7149394a1d4827b5d9 /server/protocol/src/lib.rs | |
parent | f753629acd906ff7acd42a18a266cc93a883330c (diff) | |
download | hurrycurry-218da36b4f963a5dfcd619d543cb95c5c196d214.tar hurrycurry-218da36b4f963a5dfcd619d543cb95c5c196d214.tar.bz2 hurrycurry-218da36b4f963a5dfcd619d543cb95c5c196d214.tar.zst |
update movement in protocol and all clients
Diffstat (limited to 'server/protocol/src/lib.rs')
-rw-r--r-- | server/protocol/src/lib.rs | 12 |
1 files changed, 7 insertions, 5 deletions
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<LittleEndian, Varint, Limit<4096>> = 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<Vec2>, }, @@ -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, |