|
|
@ -70,10 +70,7 @@ pub fn change_lobby(id: ClientId, |
|
|
|
let leave_lobby = packet::builder::lobby::remove_from_lobby(id, client_location)?;
|
|
|
|
let old_neighbors = client_location.get_client_neighbors(id).unwrap();
|
|
|
|
let mut lobby = LobbyId(requested_lobby as usize);
|
|
|
|
match client_location.add_client_to_lobby(id, lobby) {
|
|
|
|
Ok(lobby) => {
|
|
|
|
}
|
|
|
|
Err(err) => {
|
|
|
|
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."));
|
|
|
@ -84,7 +81,6 @@ pub fn change_lobby(id: ClientId, |
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let join_lobby = packet::builder::lobby::join_lobby(id, lobby, client_location, clients, level_table)?;
|
|
|
|
let addto = packet::builder::lobby::add_to_lobby(id, lobby, client_location, clients, level_table)?;
|
|
|
|
let neighbors = client_location.get_client_neighbors(id).unwrap();
|
|
|
|