diff options
author | Melanie | 2012-05-19 13:35:21 +0100 |
---|---|---|
committer | Melanie | 2012-05-19 13:35:21 +0100 |
commit | 768e4951476db2754b612881a16b021880384d71 (patch) | |
tree | 383bd82b091b371664fdb239904c13607cfbddcd /OpenSim/Region/CoreModules/World | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Improve locking of RegionCombinerModule.m_regions (diff) | |
download | opensim-SC-768e4951476db2754b612881a16b021880384d71.zip opensim-SC-768e4951476db2754b612881a16b021880384d71.tar.gz opensim-SC-768e4951476db2754b612881a16b021880384d71.tar.bz2 opensim-SC-768e4951476db2754b612881a16b021880384d71.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs index e54774b..504f09b 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs | |||
@@ -391,36 +391,46 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
391 | xtw.WriteElementString("datetime", ((int)t.TotalSeconds).ToString()); | 391 | xtw.WriteElementString("datetime", ((int)t.TotalSeconds).ToString()); |
392 | xtw.WriteElementString("id", UUID.Random().ToString()); | 392 | xtw.WriteElementString("id", UUID.Random().ToString()); |
393 | xtw.WriteEndElement(); | 393 | xtw.WriteEndElement(); |
394 | 394 | ||
395 | xtw.WriteElementString("assets_included", SaveAssets.ToString()); | 395 | xtw.WriteStartElement("region_info"); |
396 | 396 | ||
397 | bool isMegaregion; | 397 | bool isMegaregion; |
398 | Vector2 size; | ||
399 | IRegionCombinerModule rcMod = null; | ||
398 | 400 | ||
399 | // FIXME: This is only here for regression test purposes since they do not supply a module. Need to fix | 401 | // FIXME: This is only here for regression test purposes since they do not supply a module. Need to fix |
400 | // this, possibly by doing control file creation somewhere else. | 402 | // this, possibly by doing control file creation somewhere else. |
401 | if (m_module != null && m_module.RegionCombinerModule != null) | 403 | if (m_module != null) |
402 | { | 404 | rcMod = m_module.RegionCombinerModule; |
403 | IRegionCombinerModule mod = m_module.RegionCombinerModule; | 405 | |
404 | isMegaregion = mod.IsRootForMegaregion(m_scene.RegionInfo.RegionID); | 406 | if (rcMod != null) |
405 | } | 407 | isMegaregion = rcMod.IsRootForMegaregion(m_scene.RegionInfo.RegionID); |
406 | else | 408 | else |
407 | { | ||
408 | isMegaregion = false; | 409 | isMegaregion = false; |
409 | } | 410 | |
410 | 411 | if (isMegaregion) | |
412 | size = rcMod.GetSizeOfMegaregion(m_scene.RegionInfo.RegionID); | ||
413 | else | ||
414 | size = new Vector2((float)Constants.RegionSize, (float)Constants.RegionSize); | ||
415 | |||
411 | xtw.WriteElementString("is_megaregion", isMegaregion.ToString()); | 416 | xtw.WriteElementString("is_megaregion", isMegaregion.ToString()); |
417 | xtw.WriteElementString("size_in_meters", string.Format("{0},{1}", size.X, size.Y)); | ||
418 | |||
419 | xtw.WriteEndElement(); | ||
412 | 420 | ||
421 | xtw.WriteElementString("assets_included", SaveAssets.ToString()); | ||
422 | |||
413 | xtw.WriteEndElement(); | 423 | xtw.WriteEndElement(); |
414 | 424 | ||
415 | xtw.Flush(); | 425 | xtw.Flush(); |
416 | xtw.Close(); | ||
417 | } | 426 | } |
418 | 427 | ||
419 | s = sw.ToString(); | 428 | s = sw.ToString(); |
420 | } | 429 | } |
421 | 430 | ||
422 | // Console.WriteLine( | 431 | if (m_scene != null) |
423 | // "[ARCHIVE WRITE REQUEST PREPARATION]: Control file for {0} is: {1}", m_scene.RegionInfo.RegionName, s); | 432 | Console.WriteLine( |
433 | "[ARCHIVE WRITE REQUEST PREPARATION]: Control file for {0} is: {1}", m_scene.RegionInfo.RegionName, s); | ||
424 | 434 | ||
425 | return s; | 435 | return s; |
426 | } | 436 | } |