Compare commits
No commits in common. "6ea9bc27a398f0db420126afe39f32bc687c495d" and "c6a4c44b9cb312773b4bbb5427c1387c1bf376ca" have entirely different histories.
6ea9bc27a3
...
c6a4c44b9c
@ -1,9 +1,6 @@
|
||||
use std::net::SocketAddr;
|
||||
|
||||
use godot::{
|
||||
classes::{DisplayServer, Os},
|
||||
prelude::*,
|
||||
};
|
||||
use godot::{classes::Os, prelude::*};
|
||||
|
||||
use crate::{
|
||||
game::{Game, GameManager},
|
||||
@ -91,9 +88,7 @@ impl INode3D for CliParser {
|
||||
.connect_other(self, |s| s.on_join_lobby());
|
||||
|
||||
if let Some(port) = options.host {
|
||||
NetworkManager::singleton()
|
||||
.bind_mut()
|
||||
.host(port, DisplayServer::singleton().get_name() == "headless");
|
||||
NetworkManager::singleton().bind_mut().host(port, false);
|
||||
} else if let Some(addr) = options.join {
|
||||
NetworkManager::singleton().bind_mut().join_directly(addr);
|
||||
}
|
||||
|
||||
@ -51,19 +51,13 @@ impl IPanel for GameFinishedScreen {
|
||||
.connect_other(self, Self::save_replay);
|
||||
}
|
||||
|
||||
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(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(focus) = &mut self.base_mut().find_next_valid_focus() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user