added a new Launch.Replay=$FilePath parameter
that does not persist in settings.yaml
This commit is contained in:
@@ -318,13 +318,13 @@ namespace OpenRA
|
|||||||
foreach (var mod in Mod.AllMods)
|
foreach (var mod in Mod.AllMods)
|
||||||
Console.WriteLine("\t{0}: {1} ({2})", mod.Key, mod.Value.Title, mod.Value.Version);
|
Console.WriteLine("\t{0}: {1} ({2})", mod.Key, mod.Value.Title, mod.Value.Version);
|
||||||
|
|
||||||
InitializeWithMod(Settings.Game.Mod);
|
InitializeWithMod(Settings.Game.Mod, args.GetValue("Launch.Replay", null));
|
||||||
|
|
||||||
if (Settings.Server.DiscoverNatDevices)
|
if (Settings.Server.DiscoverNatDevices)
|
||||||
RunAfterDelay(Settings.Server.NatDiscoveryTimeout, UPnP.TryStoppingNatDiscovery);
|
RunAfterDelay(Settings.Server.NatDiscoveryTimeout, UPnP.TryStoppingNatDiscovery);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void InitializeWithMod(string mod)
|
public static void InitializeWithMod(string mod, string replay)
|
||||||
{
|
{
|
||||||
// Clear static state if we have switched mods
|
// Clear static state if we have switched mods
|
||||||
LobbyInfoChanged = () => { };
|
LobbyInfoChanged = () => { };
|
||||||
@@ -396,6 +396,8 @@ namespace OpenRA
|
|||||||
{
|
{
|
||||||
modData.LoadScreen.StartGame();
|
modData.LoadScreen.StartGame();
|
||||||
Settings.Save();
|
Settings.Save();
|
||||||
|
if (!string.IsNullOrEmpty(replay))
|
||||||
|
Game.JoinReplay(replay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
{
|
{
|
||||||
Ui.CloseWindow();
|
Ui.CloseWindow();
|
||||||
onSwitch();
|
onSwitch();
|
||||||
Game.InitializeWithMod(mod);
|
Game.InitializeWithMod(mod, null);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user