aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs15
1 files changed, 13 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 4ec530e..f17fb28 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -119,10 +119,19 @@ namespace OpenSim.Region.Framework.Scenes
119 timeFirstChanged = DateTime.Now.Ticks; 119 timeFirstChanged = DateTime.Now.Ticks;
120 } 120 }
121 m_hasGroupChanged = value; 121 m_hasGroupChanged = value;
122
123// m_log.DebugFormat(
124// "[SCENE OBJECT GROUP]: HasGroupChanged set to {0} for {1} {2}", m_hasGroupChanged, Name, LocalId);
122 } 125 }
123 126
124 get { return m_hasGroupChanged; } 127 get { return m_hasGroupChanged; }
125 } 128 }
129
130 /// <summary>
131 /// Has the group changed due to an unlink operation? We record this in order to optimize deletion, since
132 /// an unlinked group currently has to be persisted to the database before we can perform an unlink operation.
133 /// </summary>
134 public bool HasGroupChangedDueToDelink { get; private set; }
126 135
127 private bool isTimeToPersist() 136 private bool isTimeToPersist()
128 { 137 {
@@ -1330,6 +1339,7 @@ namespace OpenSim.Region.Framework.Scenes
1330 backup_group.RootPart.AngularVelocity = RootPart.AngularVelocity; 1339 backup_group.RootPart.AngularVelocity = RootPart.AngularVelocity;
1331 backup_group.RootPart.ParticleSystem = RootPart.ParticleSystem; 1340 backup_group.RootPart.ParticleSystem = RootPart.ParticleSystem;
1332 HasGroupChanged = false; 1341 HasGroupChanged = false;
1342 HasGroupChangedDueToDelink = false;
1333 1343
1334 m_scene.EventManager.TriggerOnSceneObjectPreSave(backup_group, this); 1344 m_scene.EventManager.TriggerOnSceneObjectPreSave(backup_group, this);
1335 datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID); 1345 datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID);
@@ -2208,8 +2218,9 @@ namespace OpenSim.Region.Framework.Scenes
2208 2218
2209 linkPart.Rezzed = RootPart.Rezzed; 2219 linkPart.Rezzed = RootPart.Rezzed;
2210 2220
2211 //HasGroupChanged = true; 2221 // When we delete a group, we currently have to force persist to the database if the object id has changed
2212 //ScheduleGroupForFullUpdate(); 2222 // (since delete works by deleting all rows which have a given object id)
2223 objectGroup.HasGroupChangedDueToDelink = true;
2213 2224
2214 return objectGroup; 2225 return objectGroup;
2215 } 2226 }