@@ -459,23 +459,6 @@ namespace OpenRA
|
|||||||
return orderManager != null && orderManager.world == world;
|
return orderManager != null && orderManager.world == world;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void JoinExternalGame()
|
|
||||||
{
|
|
||||||
var addressParts = Game.Settings.Game.ConnectTo.Split(
|
|
||||||
new [] { ':' }, StringSplitOptions.RemoveEmptyEntries);
|
|
||||||
|
|
||||||
if (addressParts.Length < 1 || addressParts.Length > 2)
|
|
||||||
return;
|
|
||||||
|
|
||||||
var host = addressParts[0];
|
|
||||||
var port = Exts.WithDefault(1234, () => int.Parse(addressParts[1]));
|
|
||||||
|
|
||||||
Game.Settings.Game.ConnectTo = "";
|
|
||||||
Game.Settings.Save();
|
|
||||||
|
|
||||||
Game.JoinServer(host, port);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool DownloadMap(string mapHash)
|
public static bool DownloadMap(string mapHash)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -130,7 +130,6 @@ namespace OpenRA.GameRules
|
|||||||
// Internal game settings
|
// Internal game settings
|
||||||
public int Timestep = 40;
|
public int Timestep = 40;
|
||||||
|
|
||||||
public string ConnectTo = "";
|
|
||||||
public bool AllowDownloading = true;
|
public bool AllowDownloading = true;
|
||||||
public string MapRepository = "http://content.open-ra.org/map/";
|
public string MapRepository = "http://content.open-ra.org/map/";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,7 +120,6 @@ namespace OpenRA.Mods.Cnc
|
|||||||
public void StartGame()
|
public void StartGame()
|
||||||
{
|
{
|
||||||
TestAndContinue();
|
TestAndContinue();
|
||||||
Game.JoinExternalGame();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestAndContinue()
|
void TestAndContinue()
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ namespace OpenRA.Mods.D2k
|
|||||||
public void StartGame()
|
public void StartGame()
|
||||||
{
|
{
|
||||||
TestAndContinue();
|
TestAndContinue();
|
||||||
Game.JoinExternalGame();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestAndContinue()
|
void TestAndContinue()
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ namespace OpenRA.Mods.RA
|
|||||||
public void StartGame()
|
public void StartGame()
|
||||||
{
|
{
|
||||||
TestAndContinue();
|
TestAndContinue();
|
||||||
Game.JoinExternalGame();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestAndContinue()
|
void TestAndContinue()
|
||||||
|
|||||||
Reference in New Issue
Block a user