diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index 8e2d2d53ff..d742c1aaf1 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -380,22 +380,13 @@ namespace OpenRA public static void IssueOrder(Order o) { orderManager.IssueOrder(o); } /* avoid exposing the OM to mod code */ - static void LoadShellMap(string map) - { - LoadMap(map); - world.Queries = new World.AllQueries(world); - - foreach (var gs in world.WorldActor.TraitsImplementing()) - gs.GameStarted(world); - orderManager.StartGame(); - } public static event Action AfterGameStart = () => {}; public static event Action BeforeGameStart = () => {}; - internal static void StartGame() + internal static void StartGame(string map) { BeforeGameStart(); - LoadMap(LobbyInfo.GlobalSettings.Map); + LoadMap(map); if (orderManager.GameStarted) return; Widget.SelectedWidget = null; @@ -527,7 +518,7 @@ namespace OpenRA else JoinLocal(); - LoadShellMap(Manifest.ShellmapUid); + StartGame(Manifest.ShellmapUid); ResetTimer(); @@ -559,7 +550,7 @@ namespace OpenRA LobbyInfo = new Session(); LobbyInfo.GlobalSettings.Mods = Settings.InitialMods; JoinLocal(); - LoadShellMap(shellmap); + StartGame(shellmap); Widget.RootWidget.CloseWindow(); Widget.RootWidget.OpenWindow("MAINMENU_BG"); diff --git a/OpenRA.Game/Network/UnitOrders.cs b/OpenRA.Game/Network/UnitOrders.cs index 13cd29a46d..ffea4a8f02 100755 --- a/OpenRA.Game/Network/UnitOrders.cs +++ b/OpenRA.Game/Network/UnitOrders.cs @@ -59,7 +59,7 @@ namespace OpenRA.Network case "StartGame": { Game.AddChatLine(Color.White, "Server", "The game has started."); - Game.StartGame(); + Game.StartGame(Game.LobbyInfo.GlobalSettings.Map); break; } case "SyncInfo":