Skip to content

Commit

Permalink
server menu proxy spawn
Browse files Browse the repository at this point in the history
  • Loading branch information
Piglit committed Aug 30, 2024
1 parent e003b4e commit 2531b18
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/menus/serverCreationScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,14 +440,15 @@ ServerCampaignScreen::ServerCampaignScreen()
int listenPort = game_server->getPort();
string proxyName = PreferencesManager::get("shipname", "");

// before disconnectFromServer, since it destroys gameGlobalInfo:
gameGlobalInfo->scenario = info.name;
gameGlobalInfo->scenario_filename = filename;
gameGlobalInfo->notifyCampaignServerScenario("joined");

disconnectFromServer();
new GameServerProxy(host, port, password, listenPort, proxyName);
std::this_thread::sleep_for(std::chrono::milliseconds(100));
//new JoinServerScreen(ServerBrowserMenu::SearchSource::Local, sp::io::network::Address("127.0.0.1"), listenPort);
// not working:
gameGlobalInfo->scenario = info.name;
gameGlobalInfo->scenario_filename = filename;
gameGlobalInfo->notifyCampaignServerScenario("joined");
destroy();
new MissionControlScreen(getRenderLayer());
}
Expand Down

0 comments on commit 2531b18

Please sign in to comment.