a few changes on Multiregion control file load ; load oar seems far from good
parent
f6820959b7
commit
3be340cbf2
|
@ -217,8 +217,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
m_requestId = requestId;
|
||||
m_displacement = options.ContainsKey("displacement") ? (Vector3)options["displacement"] : Vector3.Zero;
|
||||
m_rotation = options.ContainsKey("rotation") ? (float)options["rotation"] : 0f;
|
||||
m_rotationCenter = options.ContainsKey("rotation-center") ? (Vector3)options["rotation-center"]
|
||||
: new Vector3(scene.RegionInfo.RegionSizeX / 2f, scene.RegionInfo.RegionSizeY / 2f, 0f);
|
||||
|
||||
m_boundingOrigin = Vector3.Zero;
|
||||
m_boundingSize = new Vector3(scene.RegionInfo.RegionSizeX, scene.RegionInfo.RegionSizeY, float.MaxValue);
|
||||
|
@ -239,7 +237,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
else m_log.InfoFormat("[ARCHIVER]: The bounding cube origin must be within the destination region! Setting to {0}.", m_boundingOrigin.ToString());
|
||||
}
|
||||
|
||||
|
||||
if (options.ContainsKey("bounding-size"))
|
||||
{
|
||||
Vector3 bsOption = (Vector3)options["bounding-size"];
|
||||
|
@ -1194,7 +1191,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
}
|
||||
|
||||
dearchivedScenes.MultiRegionFormat = multiRegion;
|
||||
if (!multiRegion)
|
||||
if (!multiRegion && dearchivedScenes.GetScenesCount() == 0)
|
||||
{
|
||||
// Add the single scene
|
||||
dearchivedScenes.StartRow();
|
||||
|
|
|
@ -75,6 +75,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
/// The size of the region being loaded.
|
||||
/// </summary>
|
||||
public Vector3 RegionSize { get; set; }
|
||||
|
||||
public RegionInfo()
|
||||
{
|
||||
RegionSize = new Vector3(256f,256f,float.MaxValue);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -118,12 +123,12 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
public void StartRegion()
|
||||
{
|
||||
m_curX = (m_curX == null) ? 0 : m_curX + 1;
|
||||
// Note: this doesn't mean we have a real region in this location; this could just be a "hole"
|
||||
// Note: this doesn't mean we have a real region in this location; this could just be a "hole"
|
||||
}
|
||||
|
||||
public void SetRegionOriginalID(string id)
|
||||
{
|
||||
if (m_curRegion == null) m_curRegion = new RegionInfo();
|
||||
m_curRegion = new RegionInfo();
|
||||
m_curRegion.Location = new Point((int)m_curX, (int)m_curY);
|
||||
m_curRegion.OriginalID = id;
|
||||
// 'curRegion' will be saved in 'm_directory2region' when SetRegionDir() is called
|
||||
|
@ -137,7 +142,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
|
||||
public void SetRegionSize(Vector3 size)
|
||||
{
|
||||
if (m_curRegion == null) m_curRegion = new RegionInfo();
|
||||
m_curRegion.RegionSize = size;
|
||||
}
|
||||
|
||||
|
@ -155,7 +159,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
{
|
||||
foreach (RegionInfo archivedRegion in m_directory2region.Values)
|
||||
{
|
||||
Point location = new Point((int)rootScene.RegionInfo.RegionLocX, (int)rootScene.RegionInfo.RegionLocY);
|
||||
Point location = new Point((int)rootScene.RegionInfo.RegionLocX,
|
||||
(int)rootScene.RegionInfo.RegionLocY);
|
||||
|
||||
location.Offset(archivedRegion.Location);
|
||||
|
||||
Scene scene;
|
||||
|
@ -238,5 +244,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
return m_newId2region.Keys.ToList();
|
||||
}
|
||||
|
||||
public int GetScenesCount()
|
||||
{
|
||||
return m_directory2region.Count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue