diff --git a/src/ipc/zone/actor_control.rs b/src/ipc/zone/actor_control.rs index d79dba6..b97591a 100644 --- a/src/ipc/zone/actor_control.rs +++ b/src/ipc/zone/actor_control.rs @@ -41,6 +41,12 @@ pub enum ActorControlCategory { #[brw(pad_before = 22)] // actually full of info, and 2 bytes of padding at the beginning actor_id: u32, }, + #[brw(magic = 0x127u16)] + Pose { + #[brw(pad_before = 2)] //padding + unk1: u32, + pose: u32, + }, } #[binrw] diff --git a/src/ipc/zone/client_trigger.rs b/src/ipc/zone/client_trigger.rs index 7b4ba09..b3a3b42 100644 --- a/src/ipc/zone/client_trigger.rs +++ b/src/ipc/zone/client_trigger.rs @@ -12,6 +12,18 @@ pub enum ClientTriggerCommand { Unk1 {}, #[brw(magic = 0xC9u16)] Unk2 {}, + #[brw(magic = 0x1F9u16)] + ChangePose { + #[brw(pad_before = 2)] // padding + unk1: u32, + pose: u32, + }, + #[brw(magic = 0x1FAu16)] + ReapplyPose { + #[brw(pad_before = 2)] // padding + unk1: u32, + pose: u32, + }, } #[binrw] diff --git a/src/world/server.rs b/src/world/server.rs index 5433842..2c94cc1 100644 --- a/src/world/server.rs +++ b/src/world/server.rs @@ -3,7 +3,9 @@ use tokio::sync::mpsc::Receiver; use crate::{ common::ObjectId, - ipc::zone::{ActorControlCategory, ActorControlTarget, ClientTriggerCommand, CommonSpawn}, + ipc::zone::{ + ActorControl, ActorControlCategory, ActorControlTarget, ClientTriggerCommand, CommonSpawn, + }, }; use super::{Actor, ClientHandle, ClientId, FromServer, ToServer}; @@ -142,6 +144,36 @@ pub async fn server_main_loop(mut recv: Receiver) -> Result<(), std::i to_remove.push(id); } } + ClientTriggerCommand::ChangePose { unk1, pose } => { + let msg = FromServer::ActorControl( + from_actor_id, + ActorControl { + category: ActorControlCategory::Pose { + unk1: *unk1, + pose: *pose, + }, + }, + ); + + if handle.send(msg).is_err() { + to_remove.push(id); + } + } + ClientTriggerCommand::ReapplyPose { unk1, pose } => { + let msg = FromServer::ActorControl( + from_actor_id, + ActorControl { + category: ActorControlCategory::Pose { + unk1: *unk1, + pose: *pose, + }, + }, + ); + + if handle.send(msg).is_err() { + to_remove.push(id); + } + } _ => tracing::warn!("Server doesn't know what to do with {:#?}", trigger), } }