diff options
author | Justin Clarke Casey | 2008-11-10 20:04:55 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-11-10 20:04:55 +0000 |
commit | 0e180b0ad30d5f468be1c239865688449b8747cc (patch) | |
tree | 4d442315d268836641cb2b10e6937a0d308bdc18 /OpenSim/Region/Environment | |
parent | Removed some debug output I forgot to remove... (diff) | |
download | opensim-SC-0e180b0ad30d5f468be1c239865688449b8747cc.zip opensim-SC-0e180b0ad30d5f468be1c239865688449b8747cc.tar.gz opensim-SC-0e180b0ad30d5f468be1c239865688449b8747cc.tar.bz2 opensim-SC-0e180b0ad30d5f468be1c239865688449b8747cc.tar.xz |
* refactor: Expose SOG.SetRootPart for outsiders to use rather than setting RootPart and adding the part separately
* Make RootPart read only
Diffstat (limited to '')
4 files changed, 8 insertions, 13 deletions
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs index 801f8ff..d654a1a 100644 --- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs +++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs | |||
@@ -132,7 +132,6 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement | |||
132 | public SceneObjectPart RootPart | 132 | public SceneObjectPart RootPart |
133 | { | 133 | { |
134 | get { return m_Entity.RootPart; } | 134 | get { return m_Entity.RootPart; } |
135 | set { m_Entity.RootPart = value; } | ||
136 | } | 135 | } |
137 | 136 | ||
138 | public Scene Scene | 137 | public Scene Scene |
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs index bf7d944..5db9545 100644 --- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs +++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs | |||
@@ -104,11 +104,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement | |||
104 | 104 | ||
105 | //Initialize group and add part as root part | 105 | //Initialize group and add part as root part |
106 | x.SetScene(scene); | 106 | x.SetScene(scene); |
107 | y.SetParent(x); | 107 | x.SetRootPart(y); |
108 | y.ParentID = 0; | ||
109 | y.LinkNum = 0; | ||
110 | x.Children.Add(y.UUID, y); | ||
111 | x.RootPart = y; | ||
112 | x.RegionHandle = scene.RegionInfo.RegionHandle; | 108 | x.RegionHandle = scene.RegionInfo.RegionHandle; |
113 | x.SetScene(scene); | 109 | x.SetScene(scene); |
114 | 110 | ||
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 8f88d8e..d2bd698 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -184,10 +184,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
184 | set { m_parts = value; } | 184 | set { m_parts = value; } |
185 | } | 185 | } |
186 | 186 | ||
187 | /// <value> | ||
188 | /// The root part of this scene object | ||
189 | /// </value> | ||
187 | public SceneObjectPart RootPart | 190 | public SceneObjectPart RootPart |
188 | { | 191 | { |
189 | get { return m_rootPart; } | 192 | get { return m_rootPart; } |
190 | set { m_rootPart = value; } | ||
191 | } | 193 | } |
192 | 194 | ||
193 | public ulong RegionHandle | 195 | public ulong RegionHandle |
@@ -877,7 +879,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
877 | /// Set a part to act as the root part for this scene object | 879 | /// Set a part to act as the root part for this scene object |
878 | /// </summary> | 880 | /// </summary> |
879 | /// <param name="part"></param> | 881 | /// <param name="part"></param> |
880 | private void SetRootPart(SceneObjectPart part) | 882 | public void SetRootPart(SceneObjectPart part) |
881 | { | 883 | { |
882 | part.SetParent(this); | 884 | part.SetParent(this); |
883 | part.ParentID = 0; | 885 | part.ParentID = 0; |
@@ -1886,7 +1888,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1886 | 1888 | ||
1887 | m_scene.UnlinkSceneObject(objectGroup.UUID, true); | 1889 | m_scene.UnlinkSceneObject(objectGroup.UUID, true); |
1888 | objectGroup.Children.Clear(); | 1890 | objectGroup.Children.Clear(); |
1889 | objectGroup.RootPart = null; | 1891 | objectGroup.m_rootPart = null; |
1890 | 1892 | ||
1891 | // TODO Deleting the original group object may cause problems later on if they have already | 1893 | // TODO Deleting the original group object may cause problems later on if they have already |
1892 | // made it into the update queue. However, sending out updates for those parts is now | 1894 | // made it into the update queue. However, sending out updates for those parts is now |
diff --git a/OpenSim/Region/Environment/Scenes/Tests/SceneTests.cs b/OpenSim/Region/Environment/Scenes/Tests/SceneTests.cs index 4a038e2..de37eb4 100644 --- a/OpenSim/Region/Environment/Scenes/Tests/SceneTests.cs +++ b/OpenSim/Region/Environment/Scenes/Tests/SceneTests.cs | |||
@@ -78,10 +78,8 @@ namespace OpenSim.Region.Environment.Scenes.Tests | |||
78 | SceneObjectPart part | 78 | SceneObjectPart part |
79 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero); | 79 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero); |
80 | //part.UpdatePrimFlags(false, false, true); | 80 | //part.UpdatePrimFlags(false, false, true); |
81 | part.ObjectFlags |= (uint)PrimFlags.Phantom; | 81 | part.ObjectFlags |= (uint)PrimFlags.Phantom; |
82 | 82 | sceneObject.SetRootPart(part); | |
83 | sceneObject.RootPart = part; | ||
84 | sceneObject.AddPart(part); | ||
85 | 83 | ||
86 | scene.AddNewSceneObject(sceneObject, false); | 84 | scene.AddNewSceneObject(sceneObject, false); |
87 | 85 | ||