diff options
author | Justin Clarke Casey | 2008-06-17 20:36:21 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-06-17 20:36:21 +0000 |
commit | 16d0a895cb817f96a55091fadbbd4cfb2d909204 (patch) | |
tree | 30c2c790f64284dbce988554b0bb0c1ae3417307 /OpenSim/Region/Environment/Scenes/Scene.cs | |
parent | * refactor: Remove largely duplicate code from SceneXmlLoader.CreatePrimFromX... (diff) | |
download | opensim-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/Scene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index b39e08d..7adfeca 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -1460,7 +1460,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
1460 | rootPart.ObjectFlags &= ~(uint)LLObject.ObjectFlags.Scripted; | 1460 | rootPart.ObjectFlags &= ~(uint)LLObject.ObjectFlags.Scripted; |
1461 | rootPart.TrimPermissions(); | 1461 | rootPart.TrimPermissions(); |
1462 | group.CheckSculptAndLoad(); | 1462 | group.CheckSculptAndLoad(); |
1463 | group.ApplyPhysics(m_physicalPrim); | ||
1464 | //rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); | 1463 | //rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); |
1465 | } | 1464 | } |
1466 | 1465 | ||
@@ -1578,9 +1577,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
1578 | 1577 | ||
1579 | public virtual SceneObjectGroup AddNewPrim(LLUUID ownerID, LLVector3 pos, LLQuaternion rot, PrimitiveBaseShape shape) | 1578 | public virtual SceneObjectGroup AddNewPrim(LLUUID ownerID, LLVector3 pos, LLQuaternion rot, PrimitiveBaseShape shape) |
1580 | { | 1579 | { |
1580 | //m_log.DebugFormat( | ||
1581 | // "[SCENE]: Scene.AddNewPrim() called for agent {0} in {1}", ownerID, RegionInfo.RegionName); | ||
1582 | |||
1581 | SceneObjectGroup sceneOb = | 1583 | SceneObjectGroup sceneOb = |
1582 | new SceneObjectGroup(this, m_regionHandle, ownerID, PrimIDAllocate(), pos, rot, shape); | 1584 | new SceneObjectGroup(this, m_regionHandle, ownerID, PrimIDAllocate(), pos, rot, shape); |
1583 | AddSceneObject(sceneOb, true); | 1585 | |
1584 | SceneObjectPart rootPart = sceneOb.GetChildPart(sceneOb.UUID); | 1586 | SceneObjectPart rootPart = sceneOb.GetChildPart(sceneOb.UUID); |
1585 | // if grass or tree, make phantom | 1587 | // if grass or tree, make phantom |
1586 | //rootPart.TrimPermissions(); | 1588 | //rootPart.TrimPermissions(); |
@@ -1591,9 +1593,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1591 | if (rootPart.Shape.PCode != (byte)PCode.Grass) | 1593 | if (rootPart.Shape.PCode != (byte)PCode.Grass) |
1592 | AdaptTree(ref shape); | 1594 | AdaptTree(ref shape); |
1593 | } | 1595 | } |
1594 | // if not phantom, add to physics | 1596 | |
1595 | sceneOb.ApplyPhysics(m_physicalPrim); | 1597 | AddSceneObject(sceneOb, true); |
1596 | m_innerScene.AddToUpdateList(sceneOb); | ||
1597 | 1598 | ||
1598 | return sceneOb; | 1599 | return sceneOb; |
1599 | } | 1600 | } |