aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSimBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Application/OpenSimBase.cs')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 9e3dafb..a42fd3d 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -504,6 +504,37 @@ namespace OpenSim
504 } 504 }
505 505
506 /// <summary> 506 /// <summary>
507 /// Remove a region from the simulator without deleting it permanently.
508 /// </summary>
509 /// <param name="scene"></param>
510 /// <returns></returns>
511 public void CloseRegion(Scene scene)
512 {
513 // only need to check this if we are not at the
514 // root level
515 if ((m_sceneManager.CurrentScene != null) &&
516 (m_sceneManager.CurrentScene.RegionInfo.RegionID == scene.RegionInfo.RegionID))
517 {
518 m_sceneManager.TrySetCurrentScene("..");
519 }
520
521 m_sceneManager.CloseScene(scene);
522
523 }
524
525 /// <summary>
526 /// Remove a region from the simulator without deleting it permanently.
527 /// </summary>
528 /// <param name="name"></param>
529 /// <returns></returns>
530 public void CloseRegion(string name)
531 {
532 Scene target;
533 if (m_sceneManager.TryGetScene(name, out target))
534 CloseRegion(target);
535 }
536
537 /// <summary>
507 /// Create a scene and its initial base structures. 538 /// Create a scene and its initial base structures.
508 /// </summary> 539 /// </summary>
509 /// <param name="regionInfo"></param> 540 /// <param name="regionInfo"></param>