diff --git a/.gitignore b/.gitignore index 09e05764..888dc007 100644 --- a/.gitignore +++ b/.gitignore @@ -211,3 +211,4 @@ GeneratedArtifacts/ _Pvt_Extensions/ ModelManifest.xml /Master/NucleusCoop.VC.VC.opendb +*.db diff --git a/Master/NucleusCoopTool/Forms/MainForm.cs b/Master/NucleusCoopTool/Forms/MainForm.cs index 144f02de..c8d4b462 100644 --- a/Master/NucleusCoopTool/Forms/MainForm.cs +++ b/Master/NucleusCoopTool/Forms/MainForm.cs @@ -63,20 +63,17 @@ protected override void WndProc(ref Message m) public void RefreshGames() { - foreach (var con in controls) + lock (controls) { - if (con.Value != null) + foreach (var con in controls) { - con.Value.Dispose(); + if (con.Value != null) + { + con.Value.Dispose(); + } } - } - - lock (controls) - { - controls.Clear(); this.list_Games.Controls.Clear(); - - noGamesPresent = false; + controls.Clear(); List games = gameManager.User.Games; for (int i = 0; i < games.Count; i++) @@ -105,6 +102,13 @@ public void NewUserGame(UserGameInfo game) return; } + if (noGamesPresent) + { + noGamesPresent = false; + RefreshGames(); + return; + } + GameControl con = new GameControl(); con.Game = game; con.Width = list_Games.Width; diff --git a/Master/NucleusGaming/Coop/Generic/GenericGameHandler.cs b/Master/NucleusGaming/Coop/Generic/GenericGameHandler.cs index a8e74565..f05e624c 100644 --- a/Master/NucleusGaming/Coop/Generic/GenericGameHandler.cs +++ b/Master/NucleusGaming/Coop/Generic/GenericGameHandler.cs @@ -55,7 +55,7 @@ public void End() try { #if RELEASE - for (int i = 0; i < profile.PlayerCount; i++) + for (int i = 0; i < profile.PlayerData.Count; i++) { string linkFolder = Path.Combine(backupDir, "Instance" + i); if (Directory.Exists(linkFolder)) diff --git a/Master/NucleusGaming/Managers/GameManager.cs b/Master/NucleusGaming/Managers/GameManager.cs index ae26c1d2..ed06bacb 100644 --- a/Master/NucleusGaming/Managers/GameManager.cs +++ b/Master/NucleusGaming/Managers/GameManager.cs @@ -183,6 +183,13 @@ public UserGameInfo TryAddGame(string exePath) continue; } +#if RELEASE + if (game.Debug) + { + continue; + } +#endif + LogManager.Log("Found game: {0}, full path: {1}", game.GameName, exePath); UserGameInfo uinfo = new UserGameInfo(); uinfo.InitializeDefault(game, exePath); diff --git a/PreAlpha.rar b/PreAlpha.rar index ca4e25f5..95119500 100644 Binary files a/PreAlpha.rar and b/PreAlpha.rar differ