From ef07718495acabb0a72d61cd62046bb66a2de208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20P=C4=99dzich?= Date: Wed, 19 Feb 2025 14:12:46 +0100 Subject: [PATCH] fix: add missing 2022 spec fields and constants --- src/constants/mod.rs | 3 ++- src/packets/car_status.rs | 2 +- src/packets/lobby.rs | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/constants/mod.rs b/src/constants/mod.rs index d9e609f..9ae7054 100644 --- a/src/constants/mod.rs +++ b/src/constants/mod.rs @@ -112,7 +112,8 @@ pub enum SessionType { OneShotQualifying = 9, Race = 10, Race2 = 11, - TimeTrial = 12, + Race3 = 12, + TimeTrial = 13, } #[non_exhaustive] diff --git a/src/packets/car_status.rs b/src/packets/car_status.rs index af8472e..f195a12 100644 --- a/src/packets/car_status.rs +++ b/src/packets/car_status.rs @@ -14,7 +14,7 @@ use serde::{Deserialize, Serialize}; little, import(_packet_format: u16), assert( - max_gears <= 8, + max_gears <= 9, "Car status entry has an invalid max number of gears: {}", max_gears ) diff --git a/src/packets/lobby.rs b/src/packets/lobby.rs index 8f4da57..2d384f0 100644 --- a/src/packets/lobby.rs +++ b/src/packets/lobby.rs @@ -19,6 +19,8 @@ pub struct LobbyInfoData { /// Driver's name. #[br(try_map(read_name))] pub name: String, + /// Player's car number + pub car_number: u8, /// Readiness status. pub ready_status: ReadyStatus, }