diff --git a/MCGalaxy/Games/Countdown/CountdownGame.cs b/MCGalaxy/Games/Countdown/CountdownGame.cs index 3ccb4f73f..6c83b8845 100644 --- a/MCGalaxy/Games/Countdown/CountdownGame.cs +++ b/MCGalaxy/Games/Countdown/CountdownGame.cs @@ -80,14 +80,12 @@ namespace MCGalaxy.Games { return pl.ColoredName + suffix; } - public override void Start(Player p, string map, int rounds) { - map = "countdown"; - if (!LevelInfo.MapExists(map)) { - p.Message("Countdown level not found, generating.."); - GenerateMap(p, 32, 32, 32); - } - - base.Start(p, map, rounds); + protected override string GetStartMap(Player p, string forcedMap) { + if (!LevelInfo.MapExists("countdown")) { + p.Message("Countdown level not found, generating.."); + GenerateMap(p, 32, 32, 32); + } + return "countdown"; } protected override void StartGame() { diff --git a/MCGalaxy/Games/RoundsGame/RoundsGame.cs b/MCGalaxy/Games/RoundsGame/RoundsGame.cs index b03daff29..2ec4e1ef7 100644 --- a/MCGalaxy/Games/RoundsGame/RoundsGame.cs +++ b/MCGalaxy/Games/RoundsGame/RoundsGame.cs @@ -40,7 +40,7 @@ namespace MCGalaxy.Games { protected abstract void StartGame(); public virtual void Start(Player p, string map, int rounds) { - map = GetStartMap(this, map); + map = GetStartMap(p, map); if (map == null) { p.Message("No maps have been setup for {0} yet", GameName); return; } @@ -78,9 +78,9 @@ namespace MCGalaxy.Games { } } - protected virtual string GetStartMap(RoundsGame game, string forcedMap) { + protected virtual string GetStartMap(Player p, string forcedMap) { if (forcedMap.Length > 0) return forcedMap; - List maps = Picker.GetCandidateMaps(game); + List maps = Picker.GetCandidateMaps(this); if (maps == null || maps.Count == 0) return null; return LevelPicker.GetRandomMap(new Random(), maps);