This commit is contained in:
Marcel Märtens 2021-03-03 12:36:44 +01:00
parent 9028578bc8
commit a55ec20c74
2 changed files with 2 additions and 4 deletions

View File

@ -383,6 +383,7 @@ impl Server {
.await
});
runtime.block_on(network.listen(ProtocolAddr::Tcp(settings.gameserver_address)))?;
runtime.block_on(network.listen(ProtocolAddr::Mpsc(14004)))?;
let connection_handler = ConnectionHandler::new(network, &runtime);
// Initiate real-time world simulation

View File

@ -69,16 +69,13 @@ impl PlayState for MainMenuState {
if let Some(singleplayer) = &global_state.singleplayer {
match singleplayer.receiver.try_recv() {
Ok(Ok(runtime)) => {
let server_settings = singleplayer.settings();
// Attempt login after the server is finished initializing
attempt_login(
&mut global_state.settings,
&mut global_state.info_message,
"singleplayer".to_owned(),
"".to_owned(),
ClientConnArgs::Resolved(ConnectionArgs::IpAndPort(vec![
server_settings.gameserver_address,
])),
ClientConnArgs::Resolved(ConnectionArgs::Mpsc(14004)),
&mut self.client_init,
Some(runtime),
);