Merge pull request #7217 from Mailaender/chrome-init-cleanup

Cleaned up the ingame widget initialization
This commit is contained in:
Matthias Mailänder
2015-01-08 07:40:36 +01:00
24 changed files with 100 additions and 161 deletions

View File

@@ -135,7 +135,7 @@ namespace OpenRA
}
public static event Action BeforeGameStart = () => { };
internal static void StartGame(string mapUID, bool isShellmap)
internal static void StartGame(string mapUID, WorldType type)
{
Cursor.SetCursor(null);
BeforeGameStart();
@@ -146,12 +146,13 @@ namespace OpenRA
map = ModData.PrepareMap(mapUID);
using (new PerfTimer("NewWorld"))
{
OrderManager.World = new World(map, OrderManager, isShellmap);
OrderManager.World = new World(map, OrderManager, type);
OrderManager.World.Timestep = Timestep;
}
if (worldRenderer != null)
worldRenderer.Dispose();
worldRenderer = new WorldRenderer(OrderManager.World);
using (new PerfTimer("LoadComplete"))
@@ -376,7 +377,7 @@ namespace OpenRA
var shellmap = ChooseShellmap();
using (new PerfTimer("StartGame"))
StartGame(shellmap, true);
StartGame(shellmap, WorldType.Shellmap);
}
static string ChooseShellmap()