aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneGraph.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-09-01 01:22:28 +0100
committerJustin Clark-Casey (justincc)2011-09-01 01:22:28 +0100
commit095b3e5756bb3160b30c9c5670ba008fa13d2e66 (patch)
tree0052b92cf46d42d714740bb4c7404edbdbaea0de /OpenSim/Region/Framework/Scenes/SceneGraph.cs
parentFix a bug where the non-root parts of rezzed objects that had previously been... (diff)
downloadopensim-SC_OLD-095b3e5756bb3160b30c9c5670ba008fa13d2e66.zip
opensim-SC_OLD-095b3e5756bb3160b30c9c5670ba008fa13d2e66.tar.gz
opensim-SC_OLD-095b3e5756bb3160b30c9c5670ba008fa13d2e66.tar.bz2
opensim-SC_OLD-095b3e5756bb3160b30c9c5670ba008fa13d2e66.tar.xz
Remove pointless cluttering SOP.ParentGroup != null checks.
The only times when ParentGroup might be null is during regression tests (which might not be a valid thing) and when scene objects are being constructed from the database. At all other times it's not possible for a SOP not to have a SOG parent.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs29
1 files changed, 10 insertions, 19 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 76ed55c..17a1bcc 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -1630,27 +1630,18 @@ namespace OpenSim.Region.Framework.Scenes
1630 SceneObjectGroup parentGroup = root.ParentGroup; 1630 SceneObjectGroup parentGroup = root.ParentGroup;
1631 1631
1632 List<SceneObjectGroup> childGroups = new List<SceneObjectGroup>(); 1632 List<SceneObjectGroup> childGroups = new List<SceneObjectGroup>();
1633 if (parentGroup != null)
1634 {
1635 // We do this in reverse to get the link order of the prims correct
1636 for (int i = children.Count - 1; i >= 0; i--)
1637 {
1638 SceneObjectGroup child = children[i].ParentGroup;
1639 1633
1640 if (child != null) 1634 // We do this in reverse to get the link order of the prims correct
1641 { 1635 for (int i = children.Count - 1; i >= 0; i--)
1642 // Make sure no child prim is set for sale
1643 // So that, on delink, no prims are unwittingly
1644 // left for sale and sold off
1645 child.RootPart.ObjectSaleType = 0;
1646 child.RootPart.SalePrice = 10;
1647 childGroups.Add(child);
1648 }
1649 }
1650 }
1651 else
1652 { 1636 {
1653 return; // parent is null so not in this region 1637 SceneObjectGroup child = children[i].ParentGroup;
1638
1639 // Make sure no child prim is set for sale
1640 // So that, on delink, no prims are unwittingly
1641 // left for sale and sold off
1642 child.RootPart.ObjectSaleType = 0;
1643 child.RootPart.SalePrice = 10;
1644 childGroups.Add(child);
1654 } 1645 }
1655 1646
1656 foreach (SceneObjectGroup child in childGroups) 1647 foreach (SceneObjectGroup child in childGroups)