mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 12:42:22 -04:00
Fix color not reverting at TNT wars end, fix CTF/TNT wars initial tab list entry being wrong
This commit is contained in:
parent
8ebfc9a487
commit
d54fca0f33
@ -52,17 +52,18 @@ namespace MCGalaxy.Games {
|
|||||||
Logger.Log(LogType.GameActivity, "[{0}] Game started", GameName);
|
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;
|
Player[] players = PlayerInfo.Online.Items;
|
||||||
foreach (Player pl in players) {
|
foreach (Player pl in players) {
|
||||||
if (pl.level == Map) PlayerJoinedGame(pl);
|
if (pl.level == Map) PlayerJoinedGame(pl);
|
||||||
}
|
}
|
||||||
|
|
||||||
RoundsLeft = rounds;
|
|
||||||
Running = true;
|
|
||||||
IGame.RunningGames.Add(this);
|
|
||||||
OnStateChangedEvent.Call(this);
|
|
||||||
HookEventHandlers();
|
|
||||||
|
|
||||||
Thread t = new Thread(RunGame);
|
Thread t = new Thread(RunGame);
|
||||||
t.Name = "MCG_" + GameName;
|
t.Name = "MCG_" + GameName;
|
||||||
t.Start();
|
t.Start();
|
||||||
|
@ -154,6 +154,11 @@ namespace MCGalaxy.Games {
|
|||||||
Red.Members.Clear();
|
Red.Members.Clear();
|
||||||
Blue.Score = 0;
|
Blue.Score = 0;
|
||||||
Red.Score = 0;
|
Red.Score = 0;
|
||||||
|
|
||||||
|
Player[] players = allPlayers.Items;
|
||||||
|
foreach (Player pl in players) {
|
||||||
|
RestoreColor(pl);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PlayerJoinedGame(Player p) {
|
public override void PlayerJoinedGame(Player p) {
|
||||||
@ -184,6 +189,8 @@ namespace MCGalaxy.Games {
|
|||||||
Map.Message(p.ColoredName + " %Sjoined the " + team.ColoredName + " %Steam");
|
Map.Message(p.ColoredName + " %Sjoined the " + team.ColoredName + " %Steam");
|
||||||
|
|
||||||
p.color = team.Color;
|
p.color = team.Color;
|
||||||
|
p.SetPrefix();
|
||||||
|
|
||||||
Player.Message(p, "You are now on the " + team.ColoredName + " team!");
|
Player.Message(p, "You are now on the " + team.ColoredName + " team!");
|
||||||
TabList.Update(p, true);
|
TabList.Update(p, true);
|
||||||
}
|
}
|
||||||
@ -217,11 +224,6 @@ namespace MCGalaxy.Games {
|
|||||||
MessageMap(CpeMessageType.Announcement,
|
MessageMap(CpeMessageType.Announcement,
|
||||||
"&4Gamemode changed to &fFree For All");
|
"&4Gamemode changed to &fFree For All");
|
||||||
ResetTeams();
|
ResetTeams();
|
||||||
|
|
||||||
Player[] players = allPlayers.Items;
|
|
||||||
foreach (Player pl in players) {
|
|
||||||
RestoreColor(pl);
|
|
||||||
}
|
|
||||||
Config.Save();
|
Config.Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user