aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2015-11-22 05:42:13 +0000
committerUbitUmarov2015-11-22 05:42:13 +0000
commit3be340cbf2b03fe65ae9646f7b069edcb24d45fe (patch)
tree0c796152f8634e5e788033b03cc5e02732f1c01d
parent add Monitor.wait on load (diff)
downloadopensim-SC-3be340cbf2b03fe65ae9646f7b069edcb24d45fe.zip
opensim-SC-3be340cbf2b03fe65ae9646f7b069edcb24d45fe.tar.gz
opensim-SC-3be340cbf2b03fe65ae9646f7b069edcb24d45fe.tar.bz2
opensim-SC-3be340cbf2b03fe65ae9646f7b069edcb24d45fe.tar.xz
a few changes on Multiregion control file load ; load oar seems far from good
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs5
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/DearchiveScenesGroup.cs18
2 files changed, 15 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
index 63dd4b2..994fe01 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
@@ -217,8 +217,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
217 m_requestId = requestId; 217 m_requestId = requestId;
218 m_displacement = options.ContainsKey("displacement") ? (Vector3)options["displacement"] : Vector3.Zero; 218 m_displacement = options.ContainsKey("displacement") ? (Vector3)options["displacement"] : Vector3.Zero;
219 m_rotation = options.ContainsKey("rotation") ? (float)options["rotation"] : 0f; 219 m_rotation = options.ContainsKey("rotation") ? (float)options["rotation"] : 0f;
220 m_rotationCenter = options.ContainsKey("rotation-center") ? (Vector3)options["rotation-center"]
221 : new Vector3(scene.RegionInfo.RegionSizeX / 2f, scene.RegionInfo.RegionSizeY / 2f, 0f);
222 220
223 m_boundingOrigin = Vector3.Zero; 221 m_boundingOrigin = Vector3.Zero;
224 m_boundingSize = new Vector3(scene.RegionInfo.RegionSizeX, scene.RegionInfo.RegionSizeY, float.MaxValue); 222 m_boundingSize = new Vector3(scene.RegionInfo.RegionSizeX, scene.RegionInfo.RegionSizeY, float.MaxValue);
@@ -239,7 +237,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
239 else m_log.InfoFormat("[ARCHIVER]: The bounding cube origin must be within the destination region! Setting to {0}.", m_boundingOrigin.ToString()); 237 else m_log.InfoFormat("[ARCHIVER]: The bounding cube origin must be within the destination region! Setting to {0}.", m_boundingOrigin.ToString());
240 } 238 }
241 239
242
243 if (options.ContainsKey("bounding-size")) 240 if (options.ContainsKey("bounding-size"))
244 { 241 {
245 Vector3 bsOption = (Vector3)options["bounding-size"]; 242 Vector3 bsOption = (Vector3)options["bounding-size"];
@@ -1194,7 +1191,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
1194 } 1191 }
1195 1192
1196 dearchivedScenes.MultiRegionFormat = multiRegion; 1193 dearchivedScenes.MultiRegionFormat = multiRegion;
1197 if (!multiRegion) 1194 if (!multiRegion && dearchivedScenes.GetScenesCount() == 0)
1198 { 1195 {
1199 // Add the single scene 1196 // Add the single scene
1200 dearchivedScenes.StartRow(); 1197 dearchivedScenes.StartRow();
diff --git a/OpenSim/Region/CoreModules/World/Archiver/DearchiveScenesGroup.cs b/OpenSim/Region/CoreModules/World/Archiver/DearchiveScenesGroup.cs
index 12a520f..87969c2 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/DearchiveScenesGroup.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/DearchiveScenesGroup.cs
@@ -75,6 +75,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver
75 /// The size of the region being loaded. 75 /// The size of the region being loaded.
76 /// </summary> 76 /// </summary>
77 public Vector3 RegionSize { get; set; } 77 public Vector3 RegionSize { get; set; }
78
79 public RegionInfo()
80 {
81 RegionSize = new Vector3(256f,256f,float.MaxValue);
82 }
78 } 83 }
79 84
80 /// <summary> 85 /// <summary>
@@ -118,12 +123,12 @@ namespace OpenSim.Region.CoreModules.World.Archiver
118 public void StartRegion() 123 public void StartRegion()
119 { 124 {
120 m_curX = (m_curX == null) ? 0 : m_curX + 1; 125 m_curX = (m_curX == null) ? 0 : m_curX + 1;
121 // Note: this doesn't mean we have a real region in this location; this could just be a "hole" 126 // Note: this doesn't mean we have a real region in this location; this could just be a "hole"
122 } 127 }
123 128
124 public void SetRegionOriginalID(string id) 129 public void SetRegionOriginalID(string id)
125 { 130 {
126 if (m_curRegion == null) m_curRegion = new RegionInfo(); 131 m_curRegion = new RegionInfo();
127 m_curRegion.Location = new Point((int)m_curX, (int)m_curY); 132 m_curRegion.Location = new Point((int)m_curX, (int)m_curY);
128 m_curRegion.OriginalID = id; 133 m_curRegion.OriginalID = id;
129 // 'curRegion' will be saved in 'm_directory2region' when SetRegionDir() is called 134 // 'curRegion' will be saved in 'm_directory2region' when SetRegionDir() is called
@@ -137,7 +142,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
137 142
138 public void SetRegionSize(Vector3 size) 143 public void SetRegionSize(Vector3 size)
139 { 144 {
140 if (m_curRegion == null) m_curRegion = new RegionInfo();
141 m_curRegion.RegionSize = size; 145 m_curRegion.RegionSize = size;
142 } 146 }
143 147
@@ -155,7 +159,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver
155 { 159 {
156 foreach (RegionInfo archivedRegion in m_directory2region.Values) 160 foreach (RegionInfo archivedRegion in m_directory2region.Values)
157 { 161 {
158 Point location = new Point((int)rootScene.RegionInfo.RegionLocX, (int)rootScene.RegionInfo.RegionLocY); 162 Point location = new Point((int)rootScene.RegionInfo.RegionLocX,
163 (int)rootScene.RegionInfo.RegionLocY);
164
159 location.Offset(archivedRegion.Location); 165 location.Offset(archivedRegion.Location);
160 166
161 Scene scene; 167 Scene scene;
@@ -238,5 +244,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver
238 return m_newId2region.Keys.ToList(); 244 return m_newId2region.Keys.ToList();
239 } 245 }
240 246
247 public int GetScenesCount()
248 {
249 return m_directory2region.Count;
250 }
241 } 251 }
242} 252}