aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/ModuleLoader.cs3
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs47
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs17
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs8
4 files changed, 61 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/ModuleLoader.cs b/OpenSim/Region/Framework/ModuleLoader.cs
index 23be9c2..69ba2042 100644
--- a/OpenSim/Region/Framework/ModuleLoader.cs
+++ b/OpenSim/Region/Framework/ModuleLoader.cs
@@ -226,7 +226,8 @@ namespace OpenSim.Region.Framework
226 "[MODULES]: Could not load types for [{0}]. Exception {1}", pluginAssembly.FullName, e); 226 "[MODULES]: Could not load types for [{0}]. Exception {1}", pluginAssembly.FullName, e);
227 227
228 // justincc: Right now this is fatal to really get the user's attention 228 // justincc: Right now this is fatal to really get the user's attention
229 throw e; 229 // TomMeta: WTF? No, how about we /don't/ throw a fatal exception when there's no need to?
230 //throw e;
230 } 231 }
231 } 232 }
232 233
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index d4658ec..445c2c8 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -1499,10 +1499,13 @@ namespace OpenSim.Region.Framework.Scenes
1499 /// <param name="childPrims"></param> 1499 /// <param name="childPrims"></param>
1500 protected internal void LinkObjects(SceneObjectPart root, List<SceneObjectPart> children) 1500 protected internal void LinkObjects(SceneObjectPart root, List<SceneObjectPart> children)
1501 { 1501 {
1502 SceneObjectGroup parentGroup = root.ParentGroup;
1503 if (parentGroup == null) return;
1502 Monitor.Enter(m_updateLock); 1504 Monitor.Enter(m_updateLock);
1505
1503 try 1506 try
1504 { 1507 {
1505 SceneObjectGroup parentGroup = root.ParentGroup; 1508 parentGroup.areUpdatesSuspended = true;
1506 1509
1507 List<SceneObjectGroup> childGroups = new List<SceneObjectGroup>(); 1510 List<SceneObjectGroup> childGroups = new List<SceneObjectGroup>();
1508 if (parentGroup != null) 1511 if (parentGroup != null)
@@ -1541,12 +1544,12 @@ namespace OpenSim.Region.Framework.Scenes
1541 // occur on link to invoke this elsewhere (such as object selection) 1544 // occur on link to invoke this elsewhere (such as object selection)
1542 parentGroup.RootPart.AddFlag(PrimFlags.CreateSelected); 1545 parentGroup.RootPart.AddFlag(PrimFlags.CreateSelected);
1543 parentGroup.TriggerScriptChangedEvent(Changed.LINK); 1546 parentGroup.TriggerScriptChangedEvent(Changed.LINK);
1544 parentGroup.HasGroupChanged = true;
1545 parentGroup.ScheduleGroupForFullUpdate();
1546
1547 } 1547 }
1548 finally 1548 finally
1549 { 1549 {
1550 parentGroup.areUpdatesSuspended = false;
1551 parentGroup.HasGroupChanged = true;
1552 parentGroup.ScheduleGroupForFullUpdate();
1550 Monitor.Exit(m_updateLock); 1553 Monitor.Exit(m_updateLock);
1551 } 1554 }
1552 } 1555 }
@@ -1583,11 +1586,22 @@ namespace OpenSim.Region.Framework.Scenes
1583 } 1586 }
1584 } 1587 }
1585 1588
1586 foreach (SceneObjectPart child in childParts) 1589 if (childParts.Count > 0)
1587 { 1590 {
1588 // Unlink all child parts from their groups 1591 try
1589 // 1592 {
1590 child.ParentGroup.DelinkFromGroup(child, true); 1593 childParts[0].ParentGroup.areUpdatesSuspended = true;
1594 foreach (SceneObjectPart child in childParts)
1595 {
1596 // Unlink all child parts from their groups
1597 //
1598 child.ParentGroup.DelinkFromGroup(child, true);
1599 }
1600 }
1601 finally
1602 {
1603 childParts[0].ParentGroup.areUpdatesSuspended = false;
1604 }
1591 } 1605 }
1592 1606
1593 foreach (SceneObjectPart root in rootParts) 1607 foreach (SceneObjectPart root in rootParts)
@@ -1611,10 +1625,21 @@ namespace OpenSim.Region.Framework.Scenes
1611 if (numChildren > 1) 1625 if (numChildren > 1)
1612 sendEventsToRemainder = false; 1626 sendEventsToRemainder = false;
1613 1627
1614 foreach (SceneObjectPart p in newSet) 1628 if (newSet.Count > 0)
1615 { 1629 {
1616 if (p != group.RootPart) 1630 try
1617 group.DelinkFromGroup(p, sendEventsToRemainder); 1631 {
1632 newSet[0].ParentGroup.areUpdatesSuspended = true;
1633 foreach (SceneObjectPart p in newSet)
1634 {
1635 if (p != group.RootPart)
1636 group.DelinkFromGroup(p, sendEventsToRemainder);
1637 }
1638 }
1639 finally
1640 {
1641 newSet[0].ParentGroup.areUpdatesSuspended = false;
1642 }
1618 } 1643 }
1619 1644
1620 // If there is more than one prim remaining, we 1645 // If there is more than one prim remaining, we
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index cee2be3..9ebb168 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -109,9 +109,26 @@ namespace OpenSim.Region.Framework.Scenes
109 private long m_maxPersistTime = 0; 109 private long m_maxPersistTime = 0;
110 private long m_minPersistTime = 0; 110 private long m_minPersistTime = 0;
111 private Random m_rand; 111 private Random m_rand;
112 private bool m_suspendUpdates;
112 113
113 private System.Threading.ReaderWriterLockSlim m_partsLock = new System.Threading.ReaderWriterLockSlim(); 114 private System.Threading.ReaderWriterLockSlim m_partsLock = new System.Threading.ReaderWriterLockSlim();
114 115
116 public bool areUpdatesSuspended
117 {
118 get
119 {
120 return m_suspendUpdates;
121 }
122 set
123 {
124 m_suspendUpdates = value;
125 if (!value)
126 {
127 QueueForUpdateCheck();
128 }
129 }
130 }
131
115 public void lockPartsForRead(bool locked) 132 public void lockPartsForRead(bool locked)
116 { 133 {
117 if (locked) 134 if (locked)
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index c84596b..6e73b65 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2724,7 +2724,10 @@ namespace OpenSim.Region.Framework.Scenes
2724 2724
2725 if (m_parentGroup != null) 2725 if (m_parentGroup != null)
2726 { 2726 {
2727 m_parentGroup.QueueForUpdateCheck(); 2727 if (!m_parentGroup.areUpdatesSuspended)
2728 {
2729 m_parentGroup.QueueForUpdateCheck();
2730 }
2728 } 2731 }
2729 2732
2730 int timeNow = Util.UnixTimeSinceEpoch(); 2733 int timeNow = Util.UnixTimeSinceEpoch();
@@ -4450,8 +4453,9 @@ namespace OpenSim.Region.Framework.Scenes
4450 { 4453 {
4451 m_shape.TextureEntry = textureEntry; 4454 m_shape.TextureEntry = textureEntry;
4452 TriggerScriptChangedEvent(Changed.TEXTURE); 4455 TriggerScriptChangedEvent(Changed.TEXTURE);
4453 4456 m_updateFlag = 1;
4454 ParentGroup.HasGroupChanged = true; 4457 ParentGroup.HasGroupChanged = true;
4458
4455 //This is madness.. 4459 //This is madness..
4456 //ParentGroup.ScheduleGroupForFullUpdate(); 4460 //ParentGroup.ScheduleGroupForFullUpdate();
4457 //This is sparta 4461 //This is sparta