mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 11:33:28 +08:00
Resolve merge commits, stage 1
This commit is contained in:
@@ -73,6 +73,7 @@ namespace OpenSim
|
||||
AppDomain.CurrentDomain.UnhandledException +=
|
||||
new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
|
||||
|
||||
|
||||
// Add the arguments supplied when running the application to the configuration
|
||||
ArgvConfigSource configSource = new ArgvConfigSource(args);
|
||||
|
||||
@@ -91,6 +92,9 @@ namespace OpenSim
|
||||
m_log.Info("[OPENSIM MAIN]: configured log4net using default OpenSim.exe.config");
|
||||
}
|
||||
|
||||
m_log.DebugFormat(
|
||||
"[OPENSIM MAIN]: System Locale is {0}", System.Threading.Thread.CurrentThread.CurrentCulture);
|
||||
|
||||
// Increase the number of IOCP threads available. Mono defaults to a tragically low number
|
||||
int workerThreads, iocpThreads;
|
||||
System.Threading.ThreadPool.GetMaxThreads(out workerThreads, out iocpThreads);
|
||||
|
||||
@@ -130,7 +130,9 @@ namespace OpenSim
|
||||
//m_log.InfoFormat("[OPENSIM MAIN]: GC Latency Mode: {0}", GCSettings.LatencyMode.ToString());
|
||||
|
||||
if (m_gui) // Driven by external GUI
|
||||
{
|
||||
m_console = new CommandConsole("Region");
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (m_consoleType)
|
||||
@@ -547,6 +549,7 @@ namespace OpenSim
|
||||
{
|
||||
string regionName = string.Empty;
|
||||
string regionFile = string.Empty;
|
||||
|
||||
if (cmd.Length == 3)
|
||||
{
|
||||
regionFile = cmd[2];
|
||||
@@ -556,14 +559,17 @@ namespace OpenSim
|
||||
regionName = cmd[2];
|
||||
regionFile = cmd[3];
|
||||
}
|
||||
|
||||
string extension = Path.GetExtension(regionFile).ToLower();
|
||||
bool isXml = extension.Equals(".xml");
|
||||
bool isIni = extension.Equals(".ini");
|
||||
|
||||
if (!isXml && !isIni)
|
||||
{
|
||||
MainConsole.Instance.Output("Usage: create region [\"region name\"] <region_file.ini>");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Path.IsPathRooted(regionFile))
|
||||
{
|
||||
string regionsDir = ConfigSource.Source.Configs["Startup"].GetString("regionload_regionsdir", "Regions").Trim();
|
||||
@@ -580,8 +586,18 @@ namespace OpenSim
|
||||
regInfo = new RegionInfo(regionName, regionFile, false, ConfigSource.Source, regionName);
|
||||
}
|
||||
|
||||
IScene scene;
|
||||
Scene existingScene;
|
||||
if (SceneManager.TryGetScene(regInfo.RegionID, out existingScene))
|
||||
{
|
||||
MainConsole.Instance.OutputFormat(
|
||||
"ERROR: Cannot create region {0} with ID {1}, this ID is already assigned to region {2}",
|
||||
regInfo.RegionName, regInfo.RegionID, existingScene.RegionInfo.RegionName);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
PopulateRegionEstateInfo(regInfo);
|
||||
IScene scene;
|
||||
CreateRegion(regInfo, true, out scene);
|
||||
regInfo.EstateSettings.Save();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user