Kill LoadShellMap

This commit is contained in:
Paul Chote
2010-08-18 22:41:00 +12:00
parent 21b0b12948
commit 0c5fb4c6b0
2 changed files with 5 additions and 14 deletions

View File

@@ -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<IGameStarted>())
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");

View File

@@ -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":