diff --git a/src/ship/packet/handler/lobby.rs b/src/ship/packet/handler/lobby.rs index 55ecc3f..f8a898d 100644 --- a/src/ship/packet/handler/lobby.rs +++ b/src/ship/packet/handler/lobby.rs @@ -91,15 +91,15 @@ pub async fn change_lobby(id: ClientId, let old_neighbors = client_location.get_client_neighbors(id).unwrap(); let mut lobby = LobbyId(requested_lobby as usize); if let Err(_) = client_location.add_client_to_lobby(id, lobby) { - match prev_area { - RoomLobby::Lobby(_lobby) => { - let dialog = SmallDialog::new(String::from("Lobby is full.")); - return Ok(vec![(id, SendShipPacket::SmallDialog(dialog))]) - } - RoomLobby::Room(_room) => { - lobby = client_location.add_client_to_next_available_lobby(id, lobby).map_err(|_| ShipError::TooManyClients)?; - } + match prev_area { + RoomLobby::Lobby(_lobby) => { + let dialog = SmallDialog::new(String::from("Lobby is full.")); + return Ok(vec![(id, SendShipPacket::SmallDialog(dialog))]) } + RoomLobby::Room(_room) => { + lobby = client_location.add_client_to_next_available_lobby(id, lobby).map_err(|_| ShipError::TooManyClients)?; + } + } } item_manager.load_character(entity_gateway, &client.character).await; let join_lobby = packet::builder::lobby::join_lobby(id, lobby, client_location, clients, item_manager, level_table)?;