This commit is contained in:
Paul Chote
2010-07-10 15:05:17 +12:00
parent 0206f70ab8
commit 636bfd5e0a
3 changed files with 8 additions and 7 deletions

View File

@@ -597,7 +597,7 @@ namespace OpenRA
ChangeMods();
if (Settings.Replay != "")
if (Settings.Replay != null)
orderManager = new OrderManager(new ReplayConnection(Settings.Replay));
else
JoinLocal();

View File

@@ -45,11 +45,10 @@ namespace OpenRA.GameRules
public readonly int SheetSize = 2048;
// External game settings
public readonly string NetworkHost = "";
public readonly string NetworkHost = null;
public readonly int NetworkPort = 0;
public readonly int Player = 1;
public readonly string Replay = "";
public readonly string PlayerName = "";
public readonly string Replay = null;
public readonly string PlayerName = null;
public readonly string[] InitialMods = { "ra" };
public readonly string GameName = "OpenRA Game";

View File

@@ -127,9 +127,11 @@ namespace OpenRA.Widgets.Delegates
};
r.GetWidget("JOINSERVER_BUTTON_DIRECTCONNECT").OnMouseUp = mi =>
{ /* rude hack. kill this as soon as we can do a direct connect via the commandline */
{ /* rude hack. Should prompt the user once we have textfield widgets */
r.CloseWindow();
if (Game.Settings.NetworkHost != null)
Game.JoinServer(Game.Settings.NetworkHost, Game.Settings.NetworkPort);
return true;
};
}