public static void DoLoadSelectedGame_Postfix()
 {
     if (Multiplayer.IsInMultiplayerMenu)
     {
         Log.Info($"Listening server on port {Config.Options.HostPort}");
         Multiplayer.HostGame(new Server(Config.Options.HostPort, true));
     }
 }
Exemple #2
0
        private static void OnMultiplayerNewGameButtonClick()
        {
            Log.Info($"Listening server on port {Config.Options.HostPort}");
            Multiplayer.HostGame(new Server(Config.Options.HostPort));

            Multiplayer.Session.IsInLobby = true;

            UIRoot.instance.galaxySelect._Open();
            UIRoot.instance.uiMainMenu._Close();
        }
Exemple #3
0
 public static void StartDedicatedServer(string saveName)
 {
     // Mimic UI buttons clicking
     UIMainMenu_Patch.OnMultiplayerButtonClick();
     if (GameSave.SaveExist(saveName))
     {
         // Modified from DoLoadSelectedGame
         Log.Info($"Start dedicated server, loading save : {saveName}");
         DSPGame.StartGame(saveName);
         Log.Info($"Listening server on port {NebulaModel.Config.Options.HostPort}");
         Multiplayer.HostGame(new Server(NebulaModel.Config.Options.HostPort, true));
         if (command_ups != 0)
         {
             FPSController.SetFixUPS(command_ups);
         }
     }
 }
Exemple #4
0
 private void BeginHostingGame()
 {
     Multiplayer.HostGame(AppId, Port, NetTypes);
     Scene.NavigateTo(new WaitingForConnectionScene($"Hosting on Port: {Port}"));
 }