aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-07-25 17:48:58 +0000
committerJustin Clarke Casey2008-07-25 17:48:58 +0000
commitd954f46a0a8792d7d855c698ea45e8b67c0a421d (patch)
tree1f133bf5df52ef8b84eb4905e7d0de3859a4e4a6 /OpenSim/Region/Environment/Scenes
parentoops. forgot to add addin.xml for GridInfoPlugin. also, slight (diff)
downloadopensim-SC_OLD-d954f46a0a8792d7d855c698ea45e8b67c0a421d.zip
opensim-SC_OLD-d954f46a0a8792d7d855c698ea45e8b67c0a421d.tar.gz
opensim-SC_OLD-d954f46a0a8792d7d855c698ea45e8b67c0a421d.tar.bz2
opensim-SC_OLD-d954f46a0a8792d7d855c698ea45e8b67c0a421d.tar.xz
* Stop the HasGroupChanged flag being reverted for newly restored prims which need to be persisted to the db
* This should stop the problem where linked prims loaded via an archive did not survive server restart * It may address mantis 1819 though the symptoms don't look consistent
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs35
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs14
3 files changed, 27 insertions, 26 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 2b2e087..e4b109c 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -261,8 +261,8 @@ namespace OpenSim.Region.Environment.Scenes
261 Entities.Add(sceneObject.UUID, sceneObject); 261 Entities.Add(sceneObject.UUID, sceneObject);
262 m_numPrim += sceneObject.Children.Count; 262 m_numPrim += sceneObject.Children.Count;
263 263
264 if (attachToBackup) 264 if (attachToBackup)
265 sceneObject.AttachToBackup(); 265 sceneObject.AttachToBackup();
266 266
267 return true; 267 return true;
268 } 268 }
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 23490fc..abd24a2 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -512,8 +512,8 @@ namespace OpenSim.Region.Environment.Scenes
512 { 512 {
513 if (InSceneBackup) 513 if (InSceneBackup)
514 { 514 {
515// m_log.DebugFormat( 515 //m_log.DebugFormat(
516// "[SCENE OBJECT GROUP]: Attaching object {0} to scene presistence sweep", UUID); 516 // "[SCENE OBJECT GROUP]: Attaching object {0} {1} to scene presistence sweep", Name, UUID);
517 517
518 m_scene.EventManager.OnBackup += ProcessBackup; 518 m_scene.EventManager.OnBackup += ProcessBackup;
519 } 519 }
@@ -873,11 +873,15 @@ namespace OpenSim.Region.Environment.Scenes
873 return m_scene.MaxUndoCount; 873 return m_scene.MaxUndoCount;
874 return 5; 874 return 5;
875 } 875 }
876 public void ResetChildPrimPhysicsPositions() 876
877 { 877 // justincc: I don't believe this hack is needed any longer, especially since the physics
878 AbsolutePosition = AbsolutePosition; 878 // parts of set AbsolutePosition were already commented out. By changing HasGroupChanged to false
879 HasGroupChanged = false; 879 // this method was preventing proper reload of scene objects.
880 } 880 //public void ResetChildPrimPhysicsPositions()
881 //{
882 // AbsolutePosition = AbsolutePosition;
883 // HasGroupChanged = false;
884 //}
881 885
882 public LLUUID GetPartsFullID(uint localID) 886 public LLUUID GetPartsFullID(uint localID)
883 { 887 {
@@ -1061,8 +1065,9 @@ namespace OpenSim.Region.Environment.Scenes
1061 { 1065 {
1062 part.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_physicalPrim); 1066 part.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_physicalPrim);
1063 } 1067 }
1068
1064 // Hack to get the physics scene geometries in the right spot 1069 // Hack to get the physics scene geometries in the right spot
1065 ResetChildPrimPhysicsPositions(); 1070 //ResetChildPrimPhysicsPositions();
1066 } 1071 }
1067 } 1072 }
1068 else 1073 else
@@ -1095,15 +1100,15 @@ namespace OpenSim.Region.Environment.Scenes
1095 /// </summary> 1100 /// </summary>
1096 /// <param name="datastore"></param> 1101 /// <param name="datastore"></param>
1097 public void ProcessBackup(IRegionDataStore datastore) 1102 public void ProcessBackup(IRegionDataStore datastore)
1098 { 1103 {
1099 // don't backup while it's selected or you're asking for changes mid stream.
1100 if (HasGroupChanged) 1104 if (HasGroupChanged)
1101 { 1105 {
1106 // don't backup while it's selected or you're asking for changes mid stream.
1102 if ((!IsSelected) && (RootPart != null)) 1107 if ((!IsSelected) && (RootPart != null))
1103 { 1108 {
1104 m_log.InfoFormat( 1109 m_log.InfoFormat(
1105 "[SCENE]: Storing object {0}, {1} in {2}", 1110 "[SCENE]: Storing object {0}, {1} in {2}",
1106 m_rootPart.Name, UUID, m_scene.RegionInfo.RegionName); 1111 Name, UUID, m_scene.RegionInfo.RegionName);
1107 1112
1108 SceneObjectGroup backup_group = Copy(OwnerID, GroupID, false); 1113 SceneObjectGroup backup_group = Copy(OwnerID, GroupID, false);
1109 1114
@@ -1117,14 +1122,10 @@ namespace OpenSim.Region.Environment.Scenes
1117// else 1122// else
1118// { 1123// {
1119// m_log.DebugFormat( 1124// m_log.DebugFormat(
1120// "[SCENE OBJECT GROUP]: Did not update persistence of object {0} since it was still selected by an avatar during the backup sweep", UUID); 1125// "[SCENE]: Did not update persistence of object {0} {1}, selected = {2}",
1126// Name, UUID, IsSelected);
1121// } 1127// }
1122 } 1128 }
1123
1124 // Why is storing the inventory outside of HasGroupChanged?
1125
1126
1127 //ForEachPart(delegate(SceneObjectPart part) { part.ProcessInventoryBackup(datastore); });
1128 } 1129 }
1129 1130
1130 #endregion 1131 #endregion
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index a9709b1..a5daabb 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -491,16 +491,16 @@ namespace OpenSim.Region.Environment.Scenes
491 { 491 {
492 StoreUndoState(); 492 StoreUndoState();
493 m_offsetPosition = value; 493 m_offsetPosition = value;
494 try 494 //try
495 { 495 //{
496 // Hack to get the child prim to update world positions in the physics engine 496 // Hack to get the child prim to update world positions in the physics engine
497 ParentGroup.ResetChildPrimPhysicsPositions(); 497 // ParentGroup.ResetChildPrimPhysicsPositions();
498 498
499 } 499 //}
500 catch (NullReferenceException) 500 //catch (NullReferenceException)
501 { 501 //{
502 // Ignore, and skip over. 502 // Ignore, and skip over.
503 } 503 //}
504 //m_log.Info("[PART]: OFFSET:" + m_offsetPosition.ToString()); 504 //m_log.Info("[PART]: OFFSET:" + m_offsetPosition.ToString());
505 } 505 }
506 } 506 }