aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/InnerScene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/InnerScene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 3cd32c6..d09efd8 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -193,6 +193,7 @@ namespace OpenSim.Region.Environment.Scenes
193 { 193 {
194 sceneObject.RegionHandle = m_regInfo.RegionHandle; 194 sceneObject.RegionHandle = m_regInfo.RegionHandle;
195 sceneObject.SetScene(m_parentScene); 195 sceneObject.SetScene(m_parentScene);
196
196 foreach (SceneObjectPart part in sceneObject.Children.Values) 197 foreach (SceneObjectPart part in sceneObject.Children.Values)
197 { 198 {
198 part.LocalId = m_parentScene.PrimIDAllocate(); 199 part.LocalId = m_parentScene.PrimIDAllocate();
@@ -200,16 +201,20 @@ namespace OpenSim.Region.Environment.Scenes
200 } 201 }
201 sceneObject.UpdateParentIDs(); 202 sceneObject.UpdateParentIDs();
202 203
203 AddSceneObject(sceneObject); 204 AddSceneObject(sceneObject, true);
204 } 205 }
205 206
206 /// <summary> 207 /// <summary>
207 /// Add an object to the scene. 208 /// Add an object to the scene.
208 /// </summary> 209 /// </summary>
209 /// <param name="sceneObject"></param> 210 /// <param name="sceneObject"></param>
211 /// <param name="attachToBackup">
212 /// If true, the object is made persistent into the scene.
213 /// If false, the object will not persist over server restarts
214 /// </param>
210 /// <returns>true if the object was added, false if an object with the same uuid was already in the scene 215 /// <returns>true if the object was added, false if an object with the same uuid was already in the scene
211 /// </returns> 216 /// </returns>
212 protected internal bool AddSceneObject(SceneObjectGroup sceneObject) 217 protected internal bool AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup)
213 { 218 {
214 lock (Entities) 219 lock (Entities)
215 { 220 {
@@ -218,6 +223,9 @@ namespace OpenSim.Region.Environment.Scenes
218 // QuadTree.AddSceneObject(sceneObject); 223 // QuadTree.AddSceneObject(sceneObject);
219 Entities.Add(sceneObject.UUID, sceneObject); 224 Entities.Add(sceneObject.UUID, sceneObject);
220 m_numPrim += sceneObject.Children.Count; 225 m_numPrim += sceneObject.Children.Count;
226
227 if (attachToBackup)
228 sceneObject.AttachToBackup();
221 229
222 return true; 230 return true;
223 } 231 }