fixing up various issues

This commit is contained in:
Chris Forbes
2010-02-05 19:36:18 +13:00
parent 99342322af
commit 9cdefee403
7 changed files with 16 additions and 3 deletions

View File

@@ -103,6 +103,7 @@ namespace OpenRa
internal static void Initialize(string mapName, Renderer renderer, int2 clientSize, int localPlayer, Controller controller)
{
Game.renderer = renderer;
Game.clientSize = clientSize;
@@ -189,6 +190,8 @@ namespace OpenRa
public static void SyncLobbyInfo(string data)
{
var session = new Session();
session.GlobalSettings.Mods = Settings.InitialMods;
var ys = MiniYaml.FromString(data);
foreach (var y in ys)
{

View File

@@ -26,10 +26,10 @@ namespace OpenRa.GameRules
public readonly int Player = 1;
public readonly string Replay = "";
public readonly string PlayerName = "";
public readonly string[] InitialMods = { "ra" };
// Gameplay options
public readonly bool RepairRequiresConyard = true;
public readonly bool PowerDownBuildings = true;
}
}

View File

@@ -48,7 +48,9 @@ namespace OpenRa
Directory.SetCurrentDirectory("..");
}
LoadUserSettings(settings);
Game.LobbyInfo.GlobalSettings.Mods = Game.Settings.InitialMods;
// Load the default mod to access required files
Game.LoadModPackages(new Manifest(Game.LobbyInfo.GlobalSettings.Mods));