diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 48 |
2 files changed, 30 insertions, 22 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 921770d..4d19d72 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -1090,10 +1090,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
1090 | 1090 | ||
1091 | LLUUID folderID = LLUUID.Zero; | 1091 | LLUUID folderID = LLUUID.Zero; |
1092 | 1092 | ||
1093 | |||
1094 | |||
1095 | |||
1096 | |||
1097 | foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData) | 1093 | foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData) |
1098 | { | 1094 | { |
1099 | // m_log.DebugFormat( | 1095 | // m_log.DebugFormat( |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 3407d4e..4484749 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -270,11 +270,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
270 | get { return m_rootPart.Text; } | 270 | get { return m_rootPart.Text; } |
271 | set { m_rootPart.Text = value; } | 271 | set { m_rootPart.Text = value; } |
272 | } | 272 | } |
273 | 273 | ||
274 | protected virtual bool InSceneBackup | 274 | protected virtual bool InSceneBackup |
275 | { | 275 | { |
276 | get { return true; } | 276 | get { return true; } |
277 | } | 277 | } |
278 | 278 | ||
279 | public bool IsSelected | 279 | public bool IsSelected |
280 | { | 280 | { |
@@ -402,7 +402,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
402 | reader.Close(); | 402 | reader.Close(); |
403 | sr.Close(); | 403 | sr.Close(); |
404 | 404 | ||
405 | |||
406 | m_rootPart.LocalId = m_scene.PrimIDAllocate(); | 405 | m_rootPart.LocalId = m_scene.PrimIDAllocate(); |
407 | m_rootPart.ParentID = 0; | 406 | m_rootPart.ParentID = 0; |
408 | m_rootPart.RegionHandle = m_regionHandle; | 407 | m_rootPart.RegionHandle = m_regionHandle; |
@@ -521,9 +520,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
521 | { | 520 | { |
522 | if (InSceneBackup) | 521 | if (InSceneBackup) |
523 | { | 522 | { |
523 | // m_log.DebugFormat( | ||
524 | // "[SCENE OBJECT GROUP]: Attaching object {0} to scene presistence sweep", UUID); | ||
525 | |||
524 | m_scene.EventManager.OnBackup += ProcessBackup; | 526 | m_scene.EventManager.OnBackup += ProcessBackup; |
525 | } | 527 | } |
526 | } | 528 | } |
529 | |||
527 | public LLVector3 GroupScale() | 530 | public LLVector3 GroupScale() |
528 | { | 531 | { |
529 | LLVector3 minScale = new LLVector3(Constants.RegionSize,Constants.RegionSize,Constants.RegionSize); | 532 | LLVector3 minScale = new LLVector3(Constants.RegionSize,Constants.RegionSize,Constants.RegionSize); |
@@ -1071,20 +1074,31 @@ namespace OpenSim.Region.Environment.Scenes | |||
1071 | /// </summary> | 1074 | /// </summary> |
1072 | /// <param name="datastore"></param> | 1075 | /// <param name="datastore"></param> |
1073 | public void ProcessBackup(IRegionDataStore datastore) | 1076 | public void ProcessBackup(IRegionDataStore datastore) |
1074 | { | 1077 | { |
1075 | // don't backup while it's selected or you're asking for changes mid stream. | 1078 | // don't backup while it's selected or you're asking for changes mid stream. |
1076 | if (HasGroupChanged && !IsSelected) | 1079 | if (HasGroupChanged) |
1077 | { | 1080 | { |
1078 | m_log.InfoFormat("[SCENE]: STORING OBJECT {0}", UUID); | 1081 | // FIXME: Disabling this check temporarily since it seems that in some (as yet unidentified) |
1079 | 1082 | // circumstances with shift copy, we never register that some prims have been deselected, even though | |
1080 | SceneObjectGroup backup_group = Copy(OwnerID, GroupID, false); | 1083 | // they are no longer selected in the client. |
1081 | 1084 | // if (!IsSelected) | |
1082 | datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID); | 1085 | // { |
1083 | HasGroupChanged = false; | 1086 | m_log.InfoFormat("[SCENE OBJECT GROUP]: Storing object {0}", UUID); |
1087 | |||
1088 | SceneObjectGroup backup_group = Copy(OwnerID, GroupID, false); | ||
1089 | |||
1090 | datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID); | ||
1091 | HasGroupChanged = false; | ||
1084 | 1092 | ||
1085 | backup_group.ForEachPart(delegate(SceneObjectPart part) { part.ProcessInventoryBackup(datastore); }); | 1093 | backup_group.ForEachPart(delegate(SceneObjectPart part) { part.ProcessInventoryBackup(datastore); }); |
1086 | 1094 | ||
1087 | backup_group = null; | 1095 | backup_group = null; |
1096 | // } | ||
1097 | // else | ||
1098 | // { | ||
1099 | // m_log.DebugFormat( | ||
1100 | // "[SCENE OBJECT GROUP]: Did not update persistence of object {0} since it was still selected by an avatar during the backup sweep", UUID); | ||
1101 | // } | ||
1088 | } | 1102 | } |
1089 | 1103 | ||
1090 | // Why is storing the inventory outside of HasGroupChanged? | 1104 | // Why is storing the inventory outside of HasGroupChanged? |
@@ -1207,9 +1221,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1207 | { | 1221 | { |
1208 | SetRootPartOwner(m_rootPart, cAgentID, cGroupID); | 1222 | SetRootPartOwner(m_rootPart, cAgentID, cGroupID); |
1209 | m_rootPart.ScheduleFullUpdate(); | 1223 | m_rootPart.ScheduleFullUpdate(); |
1210 | } | 1224 | } |
1211 | |||
1212 | |||
1213 | 1225 | ||
1214 | List<SceneObjectPart> partList = new List<SceneObjectPart>(m_parts.Values); | 1226 | List<SceneObjectPart> partList = new List<SceneObjectPart>(m_parts.Values); |
1215 | foreach (SceneObjectPart part in partList) | 1227 | foreach (SceneObjectPart part in partList) |