From 3f2a727b6d6b0cf6c2e2c7ef11ebd0f3f1fefa83 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Sat, 19 May 2012 03:17:21 +0100 Subject: [PATCH] Remove recent IRegionCombinerModule.IsMegaregion(). In theory, there can be more than one megaregion in a simulator, separated by water. Rename IsRootRegion() to IsRootForMegaregion() --- .../Archiver/ArchiveWriteRequestPreparation.cs | 2 +- .../Framework/Interfaces/IRegionCombinerModule.cs | 10 ++-------- .../RegionCombinerModule/RegionCombinerModule.cs | 13 ++----------- 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs index 838b741fdc..e54774b339 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs @@ -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 { diff --git a/OpenSim/Region/Framework/Interfaces/IRegionCombinerModule.cs b/OpenSim/Region/Framework/Interfaces/IRegionCombinerModule.cs index 30e49b12a6..ca4ed5cb2e 100644 --- a/OpenSim/Region/Framework/Interfaces/IRegionCombinerModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IRegionCombinerModule.cs @@ -38,14 +38,8 @@ namespace OpenSim.Region.Framework.Interfaces public interface IRegionCombinerModule { /// - /// Is this simulator hosting a megaregion? + /// Does the given id belong to the root region of a megaregion? /// - /// - bool IsMegaregion { get; } - - /// - /// Does the given id belong to the root region of the megaregion? - /// - bool IsRootRegion(UUID sceneId); + bool IsRootForMegaregion(UUID sceneId); } } \ No newline at end of file diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs index 3af5cc2b29..fadc30d39f 100644 --- a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs +++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs @@ -58,20 +58,11 @@ namespace OpenSim.Region.RegionCombinerModule get { return null; } } - public bool IsMegaregion - { - get - { - lock (m_startingScenes) - return m_startingScenes.Count > 1; - } - } - /// /// This holds the root regions for the megaregions. /// /// - /// 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). /// private Dictionary m_regions = new Dictionary(); @@ -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);