mirror of
https://github.com/redstrate/Kawari.git
synced 2025-07-23 13:07:45 +00:00
Read rotation from UpdatePositionHandler
This commit is contained in:
parent
6bb6377315
commit
e31d81743f
2 changed files with 9 additions and 4 deletions
|
@ -536,9 +536,13 @@ async fn main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ClientZoneIpcData::UpdatePositionHandler {
|
ClientZoneIpcData::UpdatePositionHandler {
|
||||||
position, ..
|
position,
|
||||||
|
rotation,
|
||||||
} => {
|
} => {
|
||||||
tracing::info!("Character moved to {position:#?}");
|
tracing::info!(
|
||||||
|
"Character moved to {position:#?} {}",
|
||||||
|
rotation.to_degrees()
|
||||||
|
);
|
||||||
|
|
||||||
connection.position = *position;
|
connection.position = *position;
|
||||||
}
|
}
|
||||||
|
|
|
@ -282,8 +282,9 @@ pub enum ClientZoneIpcData {
|
||||||
},
|
},
|
||||||
#[br(pre_assert(*magic == ClientZoneIpcType::UpdatePositionHandler))]
|
#[br(pre_assert(*magic == ClientZoneIpcType::UpdatePositionHandler))]
|
||||||
UpdatePositionHandler {
|
UpdatePositionHandler {
|
||||||
// TODO: full of possibly interesting information
|
/// In radians.
|
||||||
unk: [u8; 8], // not empty
|
#[brw(pad_after = 4)] // empty
|
||||||
|
rotation: f32,
|
||||||
#[brw(pad_after = 4)] // empty
|
#[brw(pad_after = 4)] // empty
|
||||||
position: Position,
|
position: Position,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue