diff --git a/MCGalaxy/Games/CTF/CtfGame.Plugin.cs b/MCGalaxy/Games/CTF/CtfGame.Plugin.cs index 122ca7d10..d61d81e3c 100644 --- a/MCGalaxy/Games/CTF/CtfGame.Plugin.cs +++ b/MCGalaxy/Games/CTF/CtfGame.Plugin.cs @@ -143,10 +143,8 @@ namespace MCGalaxy.Games { void HandleJoinedLevel(Player p, Level prevLevel, Level level, ref bool announce) { HandleJoinedCommon(p, prevLevel, level, ref announce); - if (prevLevel == Map && level != Map) { - PlayerLeftGame(p); - } else if (level != Map) { return; } + if (level != Map) return; MessageMapInfo(p); if (TeamOf(p) != null) return; diff --git a/MCGalaxy/Games/CTF/CtfGame.cs b/MCGalaxy/Games/CTF/CtfGame.cs index 03043b3e5..3688c372a 100644 --- a/MCGalaxy/Games/CTF/CtfGame.cs +++ b/MCGalaxy/Games/CTF/CtfGame.cs @@ -41,8 +41,7 @@ namespace MCGalaxy.Games { public BlockID FlagBlock; public VolatileArray Members = new VolatileArray(); - public CtfTeam(string name, string color) { Name = name; Color = color; } - public bool Remove(Player p) { return Members.Remove(p); } + public CtfTeam(string name, string color) { Name = name; Color = color; } public void RespawnFlag(Level lvl) { Vec3U16 pos = FlagPos; @@ -148,7 +147,7 @@ namespace MCGalaxy.Games { if (team == null) return; DropFlag(p, team); - team.Remove(p); + team.Members.Remove(p); Map.Message(team.Color + p.DisplayName + " %Sleft CTF"); } diff --git a/MCGalaxy/Games/Countdown/CountdownGame.Plugin.cs b/MCGalaxy/Games/Countdown/CountdownGame.Plugin.cs index e7dd5e313..9db1f5981 100644 --- a/MCGalaxy/Games/Countdown/CountdownGame.Plugin.cs +++ b/MCGalaxy/Games/Countdown/CountdownGame.Plugin.cs @@ -70,7 +70,7 @@ namespace MCGalaxy.Games { } void HandleOnJoinedLevel(Player p, Level prevLevel, Level level, ref bool announce) { - if (prevLevel == Map && level != Map) { PlayerLeftGame(p); } + HandleJoinedCommon(p, prevLevel, level, ref announce); } } } diff --git a/MCGalaxy/Games/LavaSurvival/LSGame.Plugin.cs b/MCGalaxy/Games/LavaSurvival/LSGame.Plugin.cs index 203b9201f..53fba8c16 100644 --- a/MCGalaxy/Games/LavaSurvival/LSGame.Plugin.cs +++ b/MCGalaxy/Games/LavaSurvival/LSGame.Plugin.cs @@ -42,8 +42,8 @@ namespace MCGalaxy.Games { void HandleJoinedLevel(Player p, Level prevLevel, Level level, ref bool announce) { HandleJoinedCommon(p, prevLevel, level, ref announce); - if (Map != level) return; + if (Map != level) return; MessageMapInfo(p); if (RoundInProgress) OutputStatus(p); } diff --git a/MCGalaxy/Games/RoundsGame/RoundsGame.Plugin.cs b/MCGalaxy/Games/RoundsGame/RoundsGame.Plugin.cs index c1e8f0ba8..877b7c050 100644 --- a/MCGalaxy/Games/RoundsGame/RoundsGame.Plugin.cs +++ b/MCGalaxy/Games/RoundsGame/RoundsGame.Plugin.cs @@ -38,6 +38,8 @@ namespace MCGalaxy.Games { protected void HandleJoinedCommon(Player p, Level prevLevel, Level level, ref bool announce) { if (prevLevel == Map && level != Map) { if (Picker.Voting) Picker.ResetVoteMessage(p); + ResetHUD(p); + PlayerLeftGame(p); } else if (level == Map) { if (Picker.Voting) Picker.SendVoteMessage(p); } diff --git a/MCGalaxy/Games/ZombieSurvival/ZSGame.DB.cs b/MCGalaxy/Games/ZombieSurvival/ZSGame.DB.cs index 6e8162ae4..bd224952a 100644 --- a/MCGalaxy/Games/ZombieSurvival/ZSGame.DB.cs +++ b/MCGalaxy/Games/ZombieSurvival/ZSGame.DB.cs @@ -120,7 +120,7 @@ namespace MCGalaxy.Games { protected override void SaveStats(Player p) { ZSData data = TryGet(p); - if (data == null || data.TotalRoundsSurvived == 0 && data.TotalInfected == 0) return; + if (data == null || (data.TotalRoundsSurvived == 0 && data.TotalInfected == 0)) return; int count = Database.CountRows("ZombieStats", "WHERE Name=@0", p.name); if (count == 0) { diff --git a/MCGalaxy/Games/ZombieSurvival/ZSGame.Plugin.cs b/MCGalaxy/Games/ZombieSurvival/ZSGame.Plugin.cs index 8621ae166..ff0c2209d 100644 --- a/MCGalaxy/Games/ZombieSurvival/ZSGame.Plugin.cs +++ b/MCGalaxy/Games/ZombieSurvival/ZSGame.Plugin.cs @@ -127,11 +127,7 @@ namespace MCGalaxy.Games { void HandleJoinedLevel(Player p, Level prevLevel, Level level, ref bool announce) { HandleJoinedCommon(p, prevLevel, level, ref announce); p.SetPrefix(); // TODO: Kinda hacky, not sure if needed - - if (prevLevel == Map && level != Map) { - ResetHUD(p); - if (RoundInProgress) PlayerLeftGame(p); - } else if (level != Map) { return; } + if (level != Map) return; ZSData data = Get(p); p.SetPrefix();