Kill LoadShellMap
This commit is contained in:
@@ -380,22 +380,13 @@ namespace OpenRA
|
|||||||
|
|
||||||
public static void IssueOrder(Order o) { orderManager.IssueOrder(o); } /* avoid exposing the OM to mod code */
|
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 AfterGameStart = () => {};
|
||||||
public static event Action BeforeGameStart = () => {};
|
public static event Action BeforeGameStart = () => {};
|
||||||
internal static void StartGame()
|
internal static void StartGame(string map)
|
||||||
{
|
{
|
||||||
BeforeGameStart();
|
BeforeGameStart();
|
||||||
LoadMap(LobbyInfo.GlobalSettings.Map);
|
LoadMap(map);
|
||||||
if (orderManager.GameStarted) return;
|
if (orderManager.GameStarted) return;
|
||||||
Widget.SelectedWidget = null;
|
Widget.SelectedWidget = null;
|
||||||
|
|
||||||
@@ -527,7 +518,7 @@ namespace OpenRA
|
|||||||
else
|
else
|
||||||
JoinLocal();
|
JoinLocal();
|
||||||
|
|
||||||
LoadShellMap(Manifest.ShellmapUid);
|
StartGame(Manifest.ShellmapUid);
|
||||||
|
|
||||||
ResetTimer();
|
ResetTimer();
|
||||||
|
|
||||||
@@ -559,7 +550,7 @@ namespace OpenRA
|
|||||||
LobbyInfo = new Session();
|
LobbyInfo = new Session();
|
||||||
LobbyInfo.GlobalSettings.Mods = Settings.InitialMods;
|
LobbyInfo.GlobalSettings.Mods = Settings.InitialMods;
|
||||||
JoinLocal();
|
JoinLocal();
|
||||||
LoadShellMap(shellmap);
|
StartGame(shellmap);
|
||||||
|
|
||||||
Widget.RootWidget.CloseWindow();
|
Widget.RootWidget.CloseWindow();
|
||||||
Widget.RootWidget.OpenWindow("MAINMENU_BG");
|
Widget.RootWidget.OpenWindow("MAINMENU_BG");
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ namespace OpenRA.Network
|
|||||||
case "StartGame":
|
case "StartGame":
|
||||||
{
|
{
|
||||||
Game.AddChatLine(Color.White, "Server", "The game has started.");
|
Game.AddChatLine(Color.White, "Server", "The game has started.");
|
||||||
Game.StartGame();
|
Game.StartGame(Game.LobbyInfo.GlobalSettings.Map);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "SyncInfo":
|
case "SyncInfo":
|
||||||
|
|||||||
Reference in New Issue
Block a user