diff --git a/src/ship/packet/handler/message.rs b/src/ship/packet/handler/message.rs index e0230fe..4dfeb7e 100644 --- a/src/ship/packet/handler/message.rs +++ b/src/ship/packet/handler/message.rs @@ -162,11 +162,11 @@ where } pub fn update_player_position(id: ClientId, - clients: &mut Clients, - client_location: &ClientLocation, - rooms: &Rooms, - message: &GameMessage,) - -> Result + Send>, ShipError> { + message: &GameMessage, + clients: &mut Clients, + client_location: &ClientLocation, + rooms: &Rooms) + -> Result + Send>, ShipError> { let client = clients.get_mut(&id).ok_or(ShipError::ClientNotFound(id))?; if let Ok(room_id) = client_location.get_room(id).map_err(|err| -> ClientLocationError { err.into() }) { let room = rooms.get(room_id.0) diff --git a/src/ship/ship.rs b/src/ship/ship.rs index 086a8e8..45f0fbc 100644 --- a/src/ship/ship.rs +++ b/src/ship/ship.rs @@ -287,7 +287,7 @@ impl ShipServerState { GameMessage::PlayerWarpingToFloor(_) | GameMessage::PlayerTeleported(_) | GameMessage::PlayerStopped(_) | GameMessage::PlayerLoadedIn(_) | GameMessage::PlayerWalking(_) | GameMessage::PlayerRunning(_) | GameMessage::PlayerWarped(_) | GameMessage::PlayerChangedFloor(_) | GameMessage::InitializeSpeechNpc(_) => { - handler::message::update_player_position(id, &mut self.clients, &mut self.client_location, &self.rooms, &msg.msg) + handler::message::update_player_position(id, &msg.msg, &mut self.clients, &mut self.client_location, &self.rooms) }, _ => { let cmsg = msg.clone();