private void MultiplayerButton_Click(object sender, EventArgs e) { string subnauticaPath = ""; if (ErrorConfiguringLaunch(ref subnauticaPath)) { return; } SyncAssembliesBetweenSubnauticaManagedAndLib(subnauticaPath); NitroxEntryPatch nitroxEntryPatch = new NitroxEntryPatch(subnauticaPath); nitroxEntryPatch.Apply(); string subnauticaExe = Path.Combine(subnauticaPath, "Subnautica.exe"); Process.Start(subnauticaExe, "-EpicPortal"); //TODO: maybe an async callback to remove when the app closes. }
internal void StartMultiplayer() { string subnauticaPath = ""; if (ErrorConfiguringLaunch(ref subnauticaPath)) { return; } if (PirateDetection.IsPirate(subnauticaPath)) { if (PirateDetectedEvent != null) { PirateDetectedEvent(this, new EventArgs()); } return; } try { gameStarting = true; SyncAssetBundles(subnauticaPath); SyncMonoAssemblies(subnauticaPath); SyncAssembliesBetweenSubnauticaManagedAndLib(subnauticaPath); NitroxEntryPatch nitroxEntryPatch = new NitroxEntryPatch(subnauticaPath); nitroxEntryPatch.Remove(); // Remove any previous instances first. nitroxEntryPatch.Apply(); StartSubnautica(subnauticaPath); Thread thread = new Thread(new ThreadStart(AsyncGetProcess)); thread.Start(); } catch (Exception ex) { gameStarting = false; MessageBox.Show(ex.ToString()); } }