1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-07-22 20:47:45 +00:00

Read rotation from UpdatePositionHandler

This commit is contained in:
Joshua Goins 2025-03-28 23:29:16 -04:00
parent 6bb6377315
commit e31d81743f
2 changed files with 9 additions and 4 deletions

View file

@ -536,9 +536,13 @@ async fn main() {
}
}
ClientZoneIpcData::UpdatePositionHandler {
position, ..
position,
rotation,
} => {
tracing::info!("Character moved to {position:#?}");
tracing::info!(
"Character moved to {position:#?} {}",
rotation.to_degrees()
);
connection.position = *position;
}

View file

@ -282,8 +282,9 @@ pub enum ClientZoneIpcData {
},
#[br(pre_assert(*magic == ClientZoneIpcType::UpdatePositionHandler))]
UpdatePositionHandler {
// TODO: full of possibly interesting information
unk: [u8; 8], // not empty
/// In radians.
#[brw(pad_after = 4)] // empty
rotation: f32,
#[brw(pad_after = 4)] // empty
position: Position,
},