Fix dedicated server not going to lobby instantly
This commit is contained in:
parent
158bd3252d
commit
6ea9bc27a3
@ -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() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user