diff options
author | MW | 2007-11-13 16:31:11 +0000 |
---|---|---|
committer | MW | 2007-11-13 16:31:11 +0000 |
commit | 448612db621549968d7a8570f837863f38778400 (patch) | |
tree | b14e036fa4c97d5ad7a812215e913b65000cf452 | |
parent | working now. Needs cleanup, but I'll have to do that after the next meeting (diff) | |
download | opensim-SC_OLD-448612db621549968d7a8570f837863f38778400.zip opensim-SC_OLD-448612db621549968d7a8570f837863f38778400.tar.gz opensim-SC_OLD-448612db621549968d7a8570f837863f38778400.tar.bz2 opensim-SC_OLD-448612db621549968d7a8570f837863f38778400.tar.xz |
Added "remove-region <region name>" console command that "should" remove the named region/scene.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 16 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneBase.cs | 5 |
2 files changed, 16 insertions, 5 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index e041eef..06dc900 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -638,6 +638,22 @@ namespace OpenSim | |||
638 | CreateRegion(new RegionInfo(cmdparams[0], "Regions/" + cmdparams[1])).ServerListener(); | 638 | CreateRegion(new RegionInfo(cmdparams[0], "Regions/" + cmdparams[1])).ServerListener(); |
639 | break; | 639 | break; |
640 | 640 | ||
641 | case "remove-region": | ||
642 | string regName = CombineParams(cmdparams, 0); | ||
643 | |||
644 | Scene killScene; | ||
645 | if(m_sceneManager.TryGetScene(regName, out killScene)) | ||
646 | { | ||
647 | if (m_sceneManager.CurrentScene.RegionInfo.RegionID == killScene.RegionInfo.RegionID) | ||
648 | { | ||
649 | m_sceneManager.TrySetCurrentScene(".."); | ||
650 | } | ||
651 | m_regionData.Remove(killScene.RegionInfo); | ||
652 | m_sceneManager.CloseScene(killScene); | ||
653 | |||
654 | } | ||
655 | break; | ||
656 | |||
641 | case "quit": | 657 | case "quit": |
642 | case "shutdown": | 658 | case "shutdown": |
643 | Shutdown(); | 659 | Shutdown(); |
diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs index ace1788..1bb7d10 100644 --- a/OpenSim/Region/Environment/Scenes/SceneBase.cs +++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs | |||
@@ -58,11 +58,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
58 | get { return m_eventManager; } | 58 | get { return m_eventManager; } |
59 | } | 59 | } |
60 | 60 | ||
61 | public RegionInfo RegionsInfo | ||
62 | { | ||
63 | get { return m_regInfo; } | ||
64 | } | ||
65 | |||
66 | protected string m_datastore; | 61 | protected string m_datastore; |
67 | 62 | ||
68 | private uint m_nextLocalId = 8880000; | 63 | private uint m_nextLocalId = 8880000; |