aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/RegionCombinerModule
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-05-19 04:56:47 +0100
committerJustin Clark-Casey (justincc)2012-05-19 04:56:47 +0100
commit5759313f7f3ff121d20e5eb44013e2bbb4bc2eee (patch)
treebf0cf144375c811944fbc805c6d19ac00946df9b /OpenSim/Region/RegionCombinerModule
parentrefactor: Add RegionConnection.PosX and PosY to return position in meters rat... (diff)
downloadopensim-SC_OLD-5759313f7f3ff121d20e5eb44013e2bbb4bc2eee.zip
opensim-SC_OLD-5759313f7f3ff121d20e5eb44013e2bbb4bc2eee.tar.gz
opensim-SC_OLD-5759313f7f3ff121d20e5eb44013e2bbb4bc2eee.tar.bz2
opensim-SC_OLD-5759313f7f3ff121d20e5eb44013e2bbb4bc2eee.tar.xz
Add size of region to OAR control file. Megaregions (sw root OARs when saved) will have a size larger than 256x256
Not yet read. Do not rely on this information yet, it may change.
Diffstat (limited to 'OpenSim/Region/RegionCombinerModule')
-rw-r--r--OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs19
1 files changed, 17 insertions, 2 deletions
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
index 81ed339..98becce 100644
--- a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
+++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
@@ -113,10 +113,25 @@ namespace OpenSim.Region.RegionCombinerModule
113 } 113 }
114 } 114 }
115 115
116 public bool IsRootForMegaregion(UUID sceneId) 116 public bool IsRootForMegaregion(UUID regionId)
117 { 117 {
118 lock (m_regions) 118 lock (m_regions)
119 return m_regions.ContainsKey(sceneId); 119 return m_regions.ContainsKey(regionId);
120 }
121
122 public Vector2 GetSizeOfMegaregion(UUID regionId)
123 {
124 lock (m_regions)
125 {
126 if (m_regions.ContainsKey(regionId))
127 {
128 RegionConnections rootConn = m_regions[regionId];
129
130 return new Vector2((float)rootConn.XEnd, (float)rootConn.YEnd);
131 }
132 }
133
134 throw new Exception(string.Format("Region with id {0} not found", regionId));
120 } 135 }
121 136
122 private void NewPresence(ScenePresence presence) 137 private void NewPresence(ScenePresence presence)