diff --git a/voxygen/src/menu/server_info/mod.rs b/voxygen/src/menu/server_info/mod.rs index 731983adfd..3aa494d27a 100644 --- a/voxygen/src/menu/server_info/mod.rs +++ b/voxygen/src/menu/server_info/mod.rs @@ -12,7 +12,10 @@ use crate::{ Direction, GlobalState, PlayState, PlayStateResult, }; use client::ServerInfo; -use common::assets::{self, AssetExt}; +use common::{ + assets::{self, AssetExt}, + comp, +}; use common_base::span; use i18n::LocalizationHandle; use iced::{ @@ -23,6 +26,7 @@ use std::{ collections::hash_map::DefaultHasher, hash::{Hash, Hasher}, }; +use tracing::error; image_ids_ice! { struct Imgs { @@ -164,6 +168,20 @@ impl PlayState for ServerInfoState { } } + if let Some(char_select) = &mut self.char_select { + if let Err(err) = char_select + .client() + .borrow_mut() + .tick(comp::ControllerInputs::default(), global_state.clock.dt()) + { + let i18n = &global_state.i18n.read(); + global_state.info_message = + Some(i18n.get_msg("common-connection_lost").into_owned()); + error!(?err, "[server_info] Failed to tick the client"); + return PlayStateResult::Pop; + } + } + // Maintain the UI. let view = self.controls.view(); let (messages, _) = self.ui.maintain(