aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/InnerScene.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-06-17 20:36:21 +0000
committerJustin Clarke Casey2008-06-17 20:36:21 +0000
commit16d0a895cb817f96a55091fadbbd4cfb2d909204 (patch)
tree30c2c790f64284dbce988554b0bb0c1ae3417307 /OpenSim/Region/Environment/Scenes/InnerScene.cs
parent* refactor: Remove largely duplicate code from SceneXmlLoader.CreatePrimFromX... (diff)
downloadopensim-SC_OLD-16d0a895cb817f96a55091fadbbd4cfb2d909204.zip
opensim-SC_OLD-16d0a895cb817f96a55091fadbbd4cfb2d909204.tar.gz
opensim-SC_OLD-16d0a895cb817f96a55091fadbbd4cfb2d909204.tar.bz2
opensim-SC_OLD-16d0a895cb817f96a55091fadbbd4cfb2d909204.tar.xz
* Refactor: Move the responsibility for applying physics and sending the initial client update to Scene.AddSceneObject() from some of the SceneObjectGroup constructors
* I think this has been done cleanly from inspection and testing, but if prim creation or load suddenly starts playing up more than usual, please open a mantis * This also has the effect of stopping the archiver generating ghost in-world prims * Some code dupliction also removed
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/InnerScene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 9bbfc3d..e803122 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -197,15 +197,16 @@ namespace OpenSim.Region.Environment.Scenes
197 foreach (SceneObjectPart part in sceneObject.Children.Values) 197 foreach (SceneObjectPart part in sceneObject.Children.Values)
198 { 198 {
199 part.LocalId = m_parentScene.PrimIDAllocate(); 199 part.LocalId = m_parentScene.PrimIDAllocate();
200
201 } 200 }
201
202 sceneObject.UpdateParentIDs(); 202 sceneObject.UpdateParentIDs();
203 203
204 AddSceneObject(sceneObject, true); 204 AddSceneObject(sceneObject, true);
205 } 205 }
206 206
207 /// <summary> 207 /// <summary>
208 /// Add an object to the scene. 208 /// Add an object to the scene. This will both update the scene, and send information about the
209 /// new object to all clients interested in the scene.
209 /// </summary> 210 /// </summary>
210 /// <param name="sceneObject"></param> 211 /// <param name="sceneObject"></param>
211 /// <param name="attachToBackup"> 212 /// <param name="attachToBackup">
@@ -216,6 +217,9 @@ namespace OpenSim.Region.Environment.Scenes
216 /// </returns> 217 /// </returns>
217 protected internal bool AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) 218 protected internal bool AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup)
218 { 219 {
220 sceneObject.ApplyPhysics(m_parentScene.m_physicalPrim);
221 sceneObject.ScheduleGroupForFullUpdate();
222
219 lock (Entities) 223 lock (Entities)
220 { 224 {
221 if (!Entities.ContainsKey(sceneObject.UUID)) 225 if (!Entities.ContainsKey(sceneObject.UUID))