diff --git a/MCGalaxy/Database/Database.cs b/MCGalaxy/Database/Database.cs index 909a4b1c9..154832572 100644 --- a/MCGalaxy/Database/Database.cs +++ b/MCGalaxy/Database/Database.cs @@ -76,7 +76,7 @@ namespace MCGalaxy.SQL { internal static object Do(string sql, bool createDB, object arg, ReaderCallback callback, params object[] args) { - Exception e = null; + Exception e = null; for (int i = 0; i < 10; i++) { try { if (callback != null) { diff --git a/MCGalaxy/Games/RoundsGame/RoundsGame.cs b/MCGalaxy/Games/RoundsGame/RoundsGame.cs index 4aa7a4804..ab1b0eacf 100644 --- a/MCGalaxy/Games/RoundsGame/RoundsGame.cs +++ b/MCGalaxy/Games/RoundsGame/RoundsGame.cs @@ -51,18 +51,19 @@ namespace MCGalaxy.Games { Chat.MessageGlobal("A game of {0} is starting on {1}%S!", GameName, Map.ColoredName); Logger.Log(LogType.GameActivity, "[{0}] Game started", GameName); - StartGame(); + StartGame(); + RoundsLeft = rounds; + Running = true; + + IGame.RunningGames.Add(this); + OnStateChangedEvent.Call(this); + HookEventHandlers(); + Player[] players = PlayerInfo.Online.Items; foreach (Player pl in players) { if (pl.level == Map) PlayerJoinedGame(pl); } - RoundsLeft = rounds; - Running = true; - IGame.RunningGames.Add(this); - OnStateChangedEvent.Call(this); - HookEventHandlers(); - Thread t = new Thread(RunGame); t.Name = "MCG_" + GameName; t.Start(); diff --git a/MCGalaxy/Games/TntWars/TWGame.cs b/MCGalaxy/Games/TntWars/TWGame.cs index cc2762ab1..ad22efb9d 100644 --- a/MCGalaxy/Games/TntWars/TWGame.cs +++ b/MCGalaxy/Games/TntWars/TWGame.cs @@ -154,6 +154,11 @@ namespace MCGalaxy.Games { Red.Members.Clear(); Blue.Score = 0; Red.Score = 0; + + Player[] players = allPlayers.Items; + foreach (Player pl in players) { + RestoreColor(pl); + } } public override void PlayerJoinedGame(Player p) { @@ -184,6 +189,8 @@ namespace MCGalaxy.Games { Map.Message(p.ColoredName + " %Sjoined the " + team.ColoredName + " %Steam"); p.color = team.Color; + p.SetPrefix(); + Player.Message(p, "You are now on the " + team.ColoredName + " team!"); TabList.Update(p, true); } @@ -217,11 +224,6 @@ namespace MCGalaxy.Games { MessageMap(CpeMessageType.Announcement, "&4Gamemode changed to &fFree For All"); ResetTeams(); - - Player[] players = allPlayers.Items; - foreach (Player pl in players) { - RestoreColor(pl); - } Config.Save(); }