Remove recent IRegionCombinerModule.IsMegaregion(). In theory, there can be more than one megaregion in a simulator, separated by water.

Rename IsRootRegion() to IsRootForMegaregion()
0.7.4.1
Justin Clark-Casey (justincc) 2012-05-19 03:17:21 +01:00
parent 26dfcf5395
commit 3f2a727b6d
3 changed files with 5 additions and 20 deletions

View File

@ -401,7 +401,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
if (m_module != null && m_module.RegionCombinerModule != null)
{
IRegionCombinerModule mod = m_module.RegionCombinerModule;
isMegaregion = mod.IsMegaregion && mod.IsRootRegion(m_scene.RegionInfo.RegionID);
isMegaregion = mod.IsRootForMegaregion(m_scene.RegionInfo.RegionID);
}
else
{

View File

@ -38,14 +38,8 @@ namespace OpenSim.Region.Framework.Interfaces
public interface IRegionCombinerModule
{
/// <summary>
/// Is this simulator hosting a megaregion?
/// Does the given id belong to the root region of a megaregion?
/// </summary>
/// <value></value>
bool IsMegaregion { get; }
/// <summary>
/// Does the given id belong to the root region of the megaregion?
/// </summary>
bool IsRootRegion(UUID sceneId);
bool IsRootForMegaregion(UUID sceneId);
}
}

View File

@ -58,20 +58,11 @@ namespace OpenSim.Region.RegionCombinerModule
get { return null; }
}
public bool IsMegaregion
{
get
{
lock (m_startingScenes)
return m_startingScenes.Count > 1;
}
}
/// <summary>
/// This holds the root regions for the megaregions.
/// </summary>
/// <remarks>
/// At this point we can actually assume there is only ever one megaregion (and hence only one entry here).
/// Usually there is only ever one megaregion (and hence only one entry here).
/// </remarks>
private Dictionary<UUID, RegionConnections> m_regions = new Dictionary<UUID, RegionConnections>();
@ -122,7 +113,7 @@ namespace OpenSim.Region.RegionCombinerModule
}
}
public bool IsRootRegion(UUID sceneId)
public bool IsRootForMegaregion(UUID sceneId)
{
lock (m_regions)
return m_regions.ContainsKey(sceneId);