diff options
author | Mic Bowman | 2011-08-19 14:49:16 -0700 |
---|---|---|
committer | Mic Bowman | 2011-08-19 14:49:16 -0700 |
commit | 384cb79a1a27c47bb3fdbdef6d601a3dcb9dfb0f (patch) | |
tree | 5e557eac5d4d3d4ad95b9e3e70a2a661e5745ec3 /OpenSim/Region/Application/OpenSim.cs | |
parent | BulletSim: add runtime setting of physics parameters. Update default values. (diff) | |
parent | Get rid of HttpServer.dll to avoid confusion since we use HttpServer_OpenSim.... (diff) | |
download | opensim-SC-384cb79a1a27c47bb3fdbdef6d601a3dcb9dfb0f.zip opensim-SC-384cb79a1a27c47bb3fdbdef6d601a3dcb9dfb0f.tar.gz opensim-SC-384cb79a1a27c47bb3fdbdef6d601a3dcb9dfb0f.tar.bz2 opensim-SC-384cb79a1a27c47bb3fdbdef6d601a3dcb9dfb0f.tar.xz |
Merge branch 'master' into bulletsim
Conflicts:
OpenSim/Region/Framework/Scenes/SceneManager.cs
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 259d753..fe1525b 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -549,6 +549,7 @@ namespace OpenSim | |||
549 | { | 549 | { |
550 | string regionName = string.Empty; | 550 | string regionName = string.Empty; |
551 | string regionFile = string.Empty; | 551 | string regionFile = string.Empty; |
552 | |||
552 | if (cmd.Length == 3) | 553 | if (cmd.Length == 3) |
553 | { | 554 | { |
554 | regionFile = cmd[2]; | 555 | regionFile = cmd[2]; |
@@ -558,14 +559,17 @@ namespace OpenSim | |||
558 | regionName = cmd[2]; | 559 | regionName = cmd[2]; |
559 | regionFile = cmd[3]; | 560 | regionFile = cmd[3]; |
560 | } | 561 | } |
562 | |||
561 | string extension = Path.GetExtension(regionFile).ToLower(); | 563 | string extension = Path.GetExtension(regionFile).ToLower(); |
562 | bool isXml = extension.Equals(".xml"); | 564 | bool isXml = extension.Equals(".xml"); |
563 | bool isIni = extension.Equals(".ini"); | 565 | bool isIni = extension.Equals(".ini"); |
566 | |||
564 | if (!isXml && !isIni) | 567 | if (!isXml && !isIni) |
565 | { | 568 | { |
566 | MainConsole.Instance.Output("Usage: create region [\"region name\"] <region_file.ini>"); | 569 | MainConsole.Instance.Output("Usage: create region [\"region name\"] <region_file.ini>"); |
567 | return; | 570 | return; |
568 | } | 571 | } |
572 | |||
569 | if (!Path.IsPathRooted(regionFile)) | 573 | if (!Path.IsPathRooted(regionFile)) |
570 | { | 574 | { |
571 | string regionsDir = ConfigSource.Source.Configs["Startup"].GetString("regionload_regionsdir", "Regions").Trim(); | 575 | string regionsDir = ConfigSource.Source.Configs["Startup"].GetString("regionload_regionsdir", "Regions").Trim(); |
@@ -582,8 +586,18 @@ namespace OpenSim | |||
582 | regInfo = new RegionInfo(regionName, regionFile, false, ConfigSource.Source, regionName); | 586 | regInfo = new RegionInfo(regionName, regionFile, false, ConfigSource.Source, regionName); |
583 | } | 587 | } |
584 | 588 | ||
585 | IScene scene; | 589 | Scene existingScene; |
590 | if (SceneManager.TryGetScene(regInfo.RegionID, out existingScene)) | ||
591 | { | ||
592 | MainConsole.Instance.OutputFormat( | ||
593 | "ERROR: Cannot create region {0} with ID {1}, this ID is already assigned to region {2}", | ||
594 | regInfo.RegionName, regInfo.RegionID, existingScene.RegionInfo.RegionName); | ||
595 | |||
596 | return; | ||
597 | } | ||
598 | |||
586 | PopulateRegionEstateInfo(regInfo); | 599 | PopulateRegionEstateInfo(regInfo); |
600 | IScene scene; | ||
587 | CreateRegion(regInfo, true, out scene); | 601 | CreateRegion(regInfo, true, out scene); |
588 | regInfo.EstateSettings.Save(); | 602 | regInfo.EstateSettings.Save(); |
589 | } | 603 | } |