aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneGraph.cs
diff options
context:
space:
mode:
authorUbitUmarov2017-01-17 00:41:30 +0000
committerUbitUmarov2017-01-17 00:41:30 +0000
commita5c693e302c941be69b7eedaead72bdd3ce7aa59 (patch)
tree0bfd847f6b91f7ed8f18d3e3b71137b2eaa294e5 /OpenSim/Region/Framework/Scenes/SceneGraph.cs
parentremove now unused SetRootPartOwner() (diff)
downloadopensim-SC-a5c693e302c941be69b7eedaead72bdd3ce7aa59.zip
opensim-SC-a5c693e302c941be69b7eedaead72bdd3ce7aa59.tar.gz
opensim-SC-a5c693e302c941be69b7eedaead72bdd3ce7aa59.tar.bz2
opensim-SC-a5c693e302c941be69b7eedaead72bdd3ce7aa59.tar.xz
start adding calls to effective permissions aggregation on changes; rearrange code in DuplicateObject();
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Framework/Scenes/SceneGraph.cs27
1 files changed, 11 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 602ac4b..dad8cac 100755
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -2101,20 +2101,23 @@ namespace OpenSim.Region.Framework.Scenes
2101 SceneObjectGroup copy = original.Copy(true); 2101 SceneObjectGroup copy = original.Copy(true);
2102 copy.AbsolutePosition = copy.AbsolutePosition + offset; 2102 copy.AbsolutePosition = copy.AbsolutePosition + offset;
2103 2103
2104 SceneObjectPart[] parts = copy.Parts;
2105
2106 m_numTotalPrim += parts.Length;
2107
2104 if (original.OwnerID != AgentID) 2108 if (original.OwnerID != AgentID)
2105 { 2109 {
2106 copy.SetOwner(AgentID, GroupID); 2110 copy.SetOwner(AgentID, GroupID);
2107 2111
2108 SceneObjectPart[] partList = copy.Parts;
2109
2110 if (m_parentScene.Permissions.PropagatePermissions()) 2112 if (m_parentScene.Permissions.PropagatePermissions())
2111 { 2113 {
2112 foreach (SceneObjectPart child in partList) 2114 foreach (SceneObjectPart child in parts)
2113 { 2115 {
2114 child.Inventory.ChangeInventoryOwner(AgentID); 2116 child.Inventory.ChangeInventoryOwner(AgentID);
2115 child.TriggerScriptChangedEvent(Changed.OWNER); 2117 child.TriggerScriptChangedEvent(Changed.OWNER);
2116 child.ApplyNextOwnerPermissions(); 2118 child.ApplyNextOwnerPermissions();
2117 } 2119 }
2120 copy.AggregatePerms();
2118 } 2121 }
2119 } 2122 }
2120 2123
@@ -2124,10 +2127,6 @@ namespace OpenSim.Region.Framework.Scenes
2124 lock (SceneObjectGroupsByFullID) 2127 lock (SceneObjectGroupsByFullID)
2125 SceneObjectGroupsByFullID[copy.UUID] = copy; 2128 SceneObjectGroupsByFullID[copy.UUID] = copy;
2126 2129
2127 SceneObjectPart[] parts = copy.Parts;
2128
2129 m_numTotalPrim += parts.Length;
2130
2131 foreach (SceneObjectPart part in parts) 2130 foreach (SceneObjectPart part in parts)
2132 { 2131 {
2133 if (part.GetPrimType() == PrimType.SCULPT) 2132 if (part.GetPrimType() == PrimType.SCULPT)
@@ -2150,21 +2149,17 @@ namespace OpenSim.Region.Framework.Scenes
2150 // think it's selected, so it will never send a deselect... 2149 // think it's selected, so it will never send a deselect...
2151 copy.IsSelected = false; 2150 copy.IsSelected = false;
2152 2151
2153 m_numPrim += copy.Parts.Length;
2154
2155 if (rot != Quaternion.Identity) 2152 if (rot != Quaternion.Identity)
2156 {
2157 copy.UpdateGroupRotationR(rot); 2153 copy.UpdateGroupRotationR(rot);
2158 } 2154
2155 // required for physics to update it's position
2156 copy.ResetChildPrimPhysicsPositions();
2159 2157
2160 copy.CreateScriptInstances(0, false, m_parentScene.DefaultScriptEngine, 1); 2158 copy.CreateScriptInstances(0, false, m_parentScene.DefaultScriptEngine, 1);
2161 copy.HasGroupChanged = true;
2162 copy.ScheduleGroupForFullUpdate();
2163 copy.ResumeScripts(); 2159 copy.ResumeScripts();
2164 2160
2165 // required for physics to update it's position 2161 copy.HasGroupChanged = true;
2166 copy.AbsolutePosition = copy.AbsolutePosition; 2162 copy.ScheduleGroupForFullUpdate();
2167
2168 return copy; 2163 return copy;
2169 } 2164 }
2170 } 2165 }