예제 #1
0
        private static void OnHostCurrentGameClick()
        {
            // Make sure to save the game before enabling the multiplayer mod
            GameSave.AutoSave();

            int port = Config.DefaultPort;

            Log.Info($"Listening server on port {port}");
            var session = NebulaBootstrapper.Instance.CreateMultiplayerHostSession();

            session.StartServer(port, true);

            // Manually call the OnGameLoadCompleted here since we are already in a game.
            SimulatedWorld.OnGameLoadCompleted();

            GameMain.Resume();
        }