diff options
author | UbitUmarov | 2015-11-22 07:18:11 +0000 |
---|---|---|
committer | UbitUmarov | 2015-11-22 07:18:11 +0000 |
commit | b80cbf50605e7e8bc9cdc506dd3f2f6f9cf02a52 (patch) | |
tree | 426548dba370f7746135da6032c1f481231c6174 /OpenSim/Region/CoreModules/World | |
parent | add a a missing monitor.wait if still not needed, mb in future (diff) | |
download | opensim-SC-b80cbf50605e7e8bc9cdc506dd3f2f6f9cf02a52.zip opensim-SC-b80cbf50605e7e8bc9cdc506dd3f2f6f9cf02a52.tar.gz opensim-SC-b80cbf50605e7e8bc9cdc506dd3f2f6f9cf02a52.tar.bz2 opensim-SC-b80cbf50605e7e8bc9cdc506dd3f2f6f9cf02a52.tar.xz |
a few more changes on Multiregion control file load
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | 13 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/DearchiveScenesGroup.cs | 15 |
2 files changed, 19 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 994fe01..e8973b9 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -1150,7 +1150,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
1150 | 1150 | ||
1151 | m_log.InfoFormat("[ARCHIVER]: Loading OAR with version {0}", version); | 1151 | m_log.InfoFormat("[ARCHIVER]: Loading OAR with version {0}", version); |
1152 | } | 1152 | } |
1153 | if (xtr.Name.ToString() == "datetime") | 1153 | else if (xtr.Name.ToString() == "datetime") |
1154 | { | 1154 | { |
1155 | int value; | 1155 | int value; |
1156 | if (Int32.TryParse(xtr.ReadElementContentAsString(), out value)) | 1156 | if (Int32.TryParse(xtr.ReadElementContentAsString(), out value)) |
@@ -1169,7 +1169,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
1169 | { | 1169 | { |
1170 | string id = xtr.ReadElementContentAsString(); | 1170 | string id = xtr.ReadElementContentAsString(); |
1171 | dearchivedScenes.DefaultOriginalID = id; | 1171 | dearchivedScenes.DefaultOriginalID = id; |
1172 | if (multiRegion) | 1172 | if(multiRegion) |
1173 | dearchivedScenes.SetRegionOriginalID(id); | 1173 | dearchivedScenes.SetRegionOriginalID(id); |
1174 | } | 1174 | } |
1175 | else if (xtr.Name.ToString() == "dir") | 1175 | else if (xtr.Name.ToString() == "dir") |
@@ -1183,21 +1183,24 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
1183 | if (Vector3.TryParse(size, out value)) | 1183 | if (Vector3.TryParse(size, out value)) |
1184 | { | 1184 | { |
1185 | m_incomingRegionSize = value; | 1185 | m_incomingRegionSize = value; |
1186 | dearchivedScenes.SetRegionSize(m_incomingRegionSize); | 1186 | if(multiRegion) |
1187 | m_log.DebugFormat("[ARCHIVER]: Found region_size info {0}", m_incomingRegionSize.ToString()); | 1187 | dearchivedScenes.SetRegionSize(m_incomingRegionSize); |
1188 | m_log.DebugFormat("[ARCHIVER]: Found region_size info {0}", | ||
1189 | m_incomingRegionSize.ToString()); | ||
1188 | } | 1190 | } |
1189 | } | 1191 | } |
1190 | } | 1192 | } |
1191 | } | 1193 | } |
1192 | 1194 | ||
1193 | dearchivedScenes.MultiRegionFormat = multiRegion; | 1195 | dearchivedScenes.MultiRegionFormat = multiRegion; |
1194 | if (!multiRegion && dearchivedScenes.GetScenesCount() == 0) | 1196 | if (!multiRegion) |
1195 | { | 1197 | { |
1196 | // Add the single scene | 1198 | // Add the single scene |
1197 | dearchivedScenes.StartRow(); | 1199 | dearchivedScenes.StartRow(); |
1198 | dearchivedScenes.StartRegion(); | 1200 | dearchivedScenes.StartRegion(); |
1199 | dearchivedScenes.SetRegionOriginalID(dearchivedScenes.DefaultOriginalID); | 1201 | dearchivedScenes.SetRegionOriginalID(dearchivedScenes.DefaultOriginalID); |
1200 | dearchivedScenes.SetRegionDirectory(""); | 1202 | dearchivedScenes.SetRegionDirectory(""); |
1203 | dearchivedScenes.SetRegionSize(m_incomingRegionSize); | ||
1201 | } | 1204 | } |
1202 | 1205 | ||
1203 | ControlFileLoaded = true; | 1206 | ControlFileLoaded = true; |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/DearchiveScenesGroup.cs b/OpenSim/Region/CoreModules/World/Archiver/DearchiveScenesGroup.cs index 87969c2..e2222fe 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/DearchiveScenesGroup.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/DearchiveScenesGroup.cs | |||
@@ -129,20 +129,27 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
129 | public void SetRegionOriginalID(string id) | 129 | public void SetRegionOriginalID(string id) |
130 | { | 130 | { |
131 | m_curRegion = new RegionInfo(); | 131 | m_curRegion = new RegionInfo(); |
132 | m_curRegion.Location = new Point((int)m_curX, (int)m_curY); | 132 | int x = (int)((m_curX == null) ? 0 : m_curX); |
133 | int y = (int)((m_curY == null) ? 0 : m_curY); | ||
134 | |||
135 | m_curRegion.Location = new Point(x, y); | ||
133 | m_curRegion.OriginalID = id; | 136 | m_curRegion.OriginalID = id; |
134 | // 'curRegion' will be saved in 'm_directory2region' when SetRegionDir() is called | 137 | // 'curRegion' will be saved in 'm_directory2region' when SetRegionDir() is called |
135 | } | 138 | } |
136 | 139 | ||
137 | public void SetRegionDirectory(string directory) | 140 | public void SetRegionDirectory(string directory) |
138 | { | 141 | { |
139 | m_curRegion.Directory = directory; | 142 | if(m_curRegion != null) |
140 | m_directory2region[directory] = m_curRegion; | 143 | { |
144 | m_curRegion.Directory = directory; | ||
145 | m_directory2region[directory] = m_curRegion; | ||
146 | } | ||
141 | } | 147 | } |
142 | 148 | ||
143 | public void SetRegionSize(Vector3 size) | 149 | public void SetRegionSize(Vector3 size) |
144 | { | 150 | { |
145 | m_curRegion.RegionSize = size; | 151 | if(m_curRegion != null) |
152 | m_curRegion.RegionSize = size; | ||
146 | } | 153 | } |
147 | 154 | ||
148 | /// <summary> | 155 | /// <summary> |