Thank you kindly, RandomHuman for a patch that:

The admin_close_region method removes a region from the simulator without deleting it. 
The region can then be recreated by calling admin_create_region with the same UUID. 
There is also a change to admin_create_region to facilitate this.The reason I want 
to have this functionality is to make it possible to detach regions when they are 
idle and recreate them on demand through a web interface. It's probably doable 
using the existing methods by saving and loading oars, but it also doesn't seem 
like that should be necessary.
This commit is contained in:
Charles Krinke
2009-07-08 20:53:22 +00:00
parent 9d5d2f8fd4
commit 525ab2c278
2 changed files with 125 additions and 0 deletions

View File

@@ -503,6 +503,37 @@ namespace OpenSim
RemoveRegion(target, cleanUp);
}
/// <summary>
/// Remove a region from the simulator without deleting it permanently.
/// </summary>
/// <param name="scene"></param>
/// <returns></returns>
public void CloseRegion(Scene scene)
{
// only need to check this if we are not at the
// root level
if ((m_sceneManager.CurrentScene != null) &&
(m_sceneManager.CurrentScene.RegionInfo.RegionID == scene.RegionInfo.RegionID))
{
m_sceneManager.TrySetCurrentScene("..");
}
m_sceneManager.CloseScene(scene);
}
/// <summary>
/// Remove a region from the simulator without deleting it permanently.
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
public void CloseRegion(string name)
{
Scene target;
if (m_sceneManager.TryGetScene(name, out target))
CloseRegion(target);
}
/// <summary>
/// Create a scene and its initial base structures.
/// </summary>