Browse Source

consistency

pbs
Andy Newjack 5 years ago
parent
commit
b1b387c3ae
  1. 4
      src/ship/packet/handler/message.rs
  2. 2
      src/ship/ship.rs

4
src/ship/packet/handler/message.rs

@ -162,10 +162,10 @@ where
} }
pub fn update_player_position(id: ClientId, pub fn update_player_position(id: ClientId,
message: &GameMessage,
clients: &mut Clients, clients: &mut Clients,
client_location: &ClientLocation, client_location: &ClientLocation,
rooms: &Rooms,
message: &GameMessage,)
rooms: &Rooms)
-> Result<Box<dyn Iterator<Item = (ClientId, SendShipPacket)> + Send>, ShipError> { -> Result<Box<dyn Iterator<Item = (ClientId, SendShipPacket)> + Send>, ShipError> {
let client = clients.get_mut(&id).ok_or(ShipError::ClientNotFound(id))?; 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() }) { if let Ok(room_id) = client_location.get_room(id).map_err(|err| -> ClientLocationError { err.into() }) {

2
src/ship/ship.rs

@ -287,7 +287,7 @@ impl<EG: EntityGateway> ShipServerState<EG> {
GameMessage::PlayerWarpingToFloor(_) | GameMessage::PlayerTeleported(_) | GameMessage::PlayerStopped(_) | GameMessage::PlayerWarpingToFloor(_) | GameMessage::PlayerTeleported(_) | GameMessage::PlayerStopped(_) |
GameMessage::PlayerLoadedIn(_) | GameMessage::PlayerWalking(_) | GameMessage::PlayerRunning(_) | GameMessage::PlayerLoadedIn(_) | GameMessage::PlayerWalking(_) | GameMessage::PlayerRunning(_) |
GameMessage::PlayerWarped(_) | GameMessage::PlayerChangedFloor(_) | GameMessage::InitializeSpeechNpc(_) => { 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(); let cmsg = msg.clone();

Loading…
Cancel
Save