Fix dedicated server not going to lobby instantly

This commit is contained in:
Sofia 2026-08-15 00:34:23 +03:00
parent 158bd3252d
commit 6ea9bc27a3

View File

@ -51,13 +51,19 @@ impl IPanel for GameFinishedScreen {
.connect_other(self, Self::save_replay);
}
if let Some(game) = &mut Game::singleton()
&& let Some(recorder) = &mut game.bind_mut().replay_recorder
{
recorder
.signals()
.on_saved()
.connect_other(self, Self::on_replay_saved);
if let Some(game) = &mut Game::singleton() {
if let Some(recorder) = &mut game.bind_mut().replay_recorder {
recorder
.signals()
.on_saved()
.connect_other(self, Self::on_replay_saved);
}
if game.bind().is_host() && game.bind().self_id.is_none() {
game.bind_mut().reset_game();
self.run_deferred(|_| {
GameManager::singleton().bind().go_to_lobby();
});
}
}
if let Some(focus) = &mut self.base_mut().find_next_valid_focus() {