Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
commit
80bf95b7b4
|
@ -217,31 +217,20 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
m_scene.DeleteAllSceneObjects();
|
m_scene.DeleteAllSceneObjects();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to retain the original creator/owner/lastowner if their uuid is present on this grid
|
LoadParcels(serialisedParcels);
|
||||||
// otherwise, use the master avatar uuid instead
|
LoadObjects(serialisedSceneObjects);
|
||||||
|
|
||||||
// Reload serialized parcels
|
m_log.InfoFormat("[ARCHIVER]: Successfully loaded archive");
|
||||||
m_log.InfoFormat("[ARCHIVER]: Loading {0} parcels. Please wait.", serialisedParcels.Count);
|
|
||||||
List<LandData> landData = new List<LandData>();
|
|
||||||
foreach (string serialisedParcel in serialisedParcels)
|
|
||||||
{
|
|
||||||
LandData parcel = LandDataSerializer.Deserialize(serialisedParcel);
|
|
||||||
if (!ResolveUserUuid(parcel.OwnerID))
|
|
||||||
parcel.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
|
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
m_scene.EventManager.TriggerOarFileLoaded(m_requestId, m_errorMessage);
|
||||||
// "[ARCHIVER]: Adding parcel {0}, local id {1}, area {2}",
|
}
|
||||||
// parcel.Name, parcel.LocalID, parcel.Area);
|
|
||||||
|
|
||||||
landData.Add(parcel);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!m_merge)
|
|
||||||
m_scene.LandChannel.Clear(false);
|
|
||||||
|
|
||||||
m_scene.EventManager.TriggerIncomingLandDataFromStorage(landData);
|
|
||||||
m_log.InfoFormat("[ARCHIVER]: Restored {0} parcels.", landData.Count);
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Load serialized scene objects.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="serialisedSceneObjects"></param>
|
||||||
|
protected void LoadObjects(List<string> serialisedSceneObjects)
|
||||||
|
{
|
||||||
// Reload serialized prims
|
// Reload serialized prims
|
||||||
m_log.InfoFormat("[ARCHIVER]: Loading {0} scene objects. Please wait.", serialisedSceneObjects.Count);
|
m_log.InfoFormat("[ARCHIVER]: Loading {0} scene objects. Please wait.", serialisedSceneObjects.Count);
|
||||||
|
|
||||||
|
@ -271,6 +260,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
// to the same scene (when this is possible).
|
// to the same scene (when this is possible).
|
||||||
sceneObject.ResetIDs();
|
sceneObject.ResetIDs();
|
||||||
|
|
||||||
|
// Try to retain the original creator/owner/lastowner if their uuid is present on this grid
|
||||||
|
// or creator data is present. Otherwise, use the estate owner instead.
|
||||||
foreach (SceneObjectPart part in sceneObject.Parts)
|
foreach (SceneObjectPart part in sceneObject.Parts)
|
||||||
{
|
{
|
||||||
if (part.CreatorData == null || part.CreatorData == string.Empty)
|
if (part.CreatorData == null || part.CreatorData == string.Empty)
|
||||||
|
@ -328,10 +319,35 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
|
|
||||||
if (ignoredObjects > 0)
|
if (ignoredObjects > 0)
|
||||||
m_log.WarnFormat("[ARCHIVER]: Ignored {0} scene objects that already existed in the scene", ignoredObjects);
|
m_log.WarnFormat("[ARCHIVER]: Ignored {0} scene objects that already existed in the scene", ignoredObjects);
|
||||||
|
}
|
||||||
|
|
||||||
m_log.InfoFormat("[ARCHIVER]: Successfully loaded archive");
|
/// <summary>
|
||||||
|
/// Load serialized parcels.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="serialisedParcels"></param>
|
||||||
|
protected void LoadParcels(List<string> serialisedParcels)
|
||||||
|
{
|
||||||
|
// Reload serialized parcels
|
||||||
|
m_log.InfoFormat("[ARCHIVER]: Loading {0} parcels. Please wait.", serialisedParcels.Count);
|
||||||
|
List<LandData> landData = new List<LandData>();
|
||||||
|
foreach (string serialisedParcel in serialisedParcels)
|
||||||
|
{
|
||||||
|
LandData parcel = LandDataSerializer.Deserialize(serialisedParcel);
|
||||||
|
if (!ResolveUserUuid(parcel.OwnerID))
|
||||||
|
parcel.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
|
||||||
|
|
||||||
m_scene.EventManager.TriggerOarFileLoaded(m_requestId, m_errorMessage);
|
// m_log.DebugFormat(
|
||||||
|
// "[ARCHIVER]: Adding parcel {0}, local id {1}, area {2}",
|
||||||
|
// parcel.Name, parcel.LocalID, parcel.Area);
|
||||||
|
|
||||||
|
landData.Add(parcel);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!m_merge)
|
||||||
|
m_scene.LandChannel.Clear(false);
|
||||||
|
|
||||||
|
m_scene.EventManager.TriggerIncomingLandDataFromStorage(landData);
|
||||||
|
m_log.InfoFormat("[ARCHIVER]: Restored {0} parcels.", landData.Count);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -1653,9 +1653,21 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
protected void ClearCommand(Object[] args)
|
protected void ClearCommand(Object[] args)
|
||||||
{
|
{
|
||||||
Clear(true);
|
string response = MainConsole.Instance.CmdPrompt(
|
||||||
|
string.Format(
|
||||||
|
"Are you sure that you want to clear all land parcels from {0} (y or n)",
|
||||||
|
m_scene.RegionInfo.RegionName),
|
||||||
|
"n");
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat("Cleared all parcels from {0}", m_scene.RegionInfo.RegionName);
|
if (response.ToLower() == "y")
|
||||||
|
{
|
||||||
|
Clear(true);
|
||||||
|
MainConsole.Instance.OutputFormat("Cleared all parcels from {0}", m_scene.RegionInfo.RegionName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MainConsole.Instance.OutputFormat("Aborting clear of all parcels from {0}", m_scene.RegionInfo.RegionName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void ShowParcelsCommand(Object[] args)
|
protected void ShowParcelsCommand(Object[] args)
|
||||||
|
|
Loading…
Reference in New Issue