From 519e01fe6564f75693acf0cb62703ee90981e814 Mon Sep 17 00:00:00 2001 From: jake Date: Sun, 15 Dec 2019 23:14:17 -0800 Subject: [PATCH] add gcmd 0x20 0xAE --- src/packet/messages.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/packet/messages.rs b/src/packet/messages.rs index c7446d9..fb23b03 100644 --- a/src/packet/messages.rs +++ b/src/packet/messages.rs @@ -47,6 +47,14 @@ pub struct PlayerChangedMap2 { unknown1: u32, } +#[pso_message(0x20)] +pub struct TellOtherPlayerMyLocation { + unknown1: u32, + unknown2: u32, + x: f32, + y: f32, + z: f32, +} #[pso_message(0x3F)] pub struct PlayerLoadedIn { @@ -63,6 +71,15 @@ pub struct PlayerDoneChangingMap { } +#[pso_message(0xAE)] +pub struct UnknownAE { + unknown1: u32, + unknown2: u32, + unknown3: u32, +} + + + #[derive(Debug, Clone, PartialEq)] pub enum GameMessage { PlayerWalking(PlayerWalking), @@ -72,6 +89,8 @@ pub enum GameMessage { PlayerChangedMap(PlayerChangedMap), PlayerChangedMap2(PlayerChangedMap2), PlayerDoneChangingMap(PlayerDoneChangingMap), + TellOtherPlayerMyLocation(TellOtherPlayerMyLocation), + UnknownAE(UnknownAE), } impl PSOPacketData for GameMessage { @@ -89,6 +108,8 @@ impl PSOPacketData for GameMessage { PlayerChangedMap::CMD if len[0] == 6 => Ok(GameMessage::PlayerChangedMap(PlayerChangedMap::from_bytes(&mut cur)?)), PlayerChangedMap2::CMD if len[0] == 2 => Ok(GameMessage::PlayerChangedMap2(PlayerChangedMap2::from_bytes(&mut cur)?)), PlayerDoneChangingMap::CMD => Ok(GameMessage::PlayerDoneChangingMap(PlayerDoneChangingMap::from_bytes(&mut cur)?)), + TellOtherPlayerMyLocation::CMD => Ok(GameMessage::TellOtherPlayerMyLocation(TellOtherPlayerMyLocation::from_bytes(&mut cur)?)), + UnknownAE::CMD => Ok(GameMessage::UnknownAE(UnknownAE::from_bytes(&mut cur)?)), _ => Err(PacketParseError::WrongPacketCommand), } } @@ -101,6 +122,8 @@ impl PSOPacketData for GameMessage { GameMessage::PlayerChangedMap(data) => data.as_bytes(), GameMessage::PlayerChangedMap2(data) => data.as_bytes(), GameMessage::PlayerDoneChangingMap(data) => data.as_bytes(), + GameMessage::TellOtherPlayerMyLocation(data) => data.as_bytes(), + GameMessage::UnknownAE(data) => data.as_bytes(), } } }