mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
* 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
This commit is contained in:
@@ -1460,7 +1460,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
rootPart.ObjectFlags &= ~(uint)LLObject.ObjectFlags.Scripted;
|
||||
rootPart.TrimPermissions();
|
||||
group.CheckSculptAndLoad();
|
||||
group.ApplyPhysics(m_physicalPrim);
|
||||
//rootPart.DoPhysicsPropertyUpdate(UsePhysics, true);
|
||||
}
|
||||
|
||||
@@ -1578,9 +1577,12 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
public virtual SceneObjectGroup AddNewPrim(LLUUID ownerID, LLVector3 pos, LLQuaternion rot, PrimitiveBaseShape shape)
|
||||
{
|
||||
//m_log.DebugFormat(
|
||||
// "[SCENE]: Scene.AddNewPrim() called for agent {0} in {1}", ownerID, RegionInfo.RegionName);
|
||||
|
||||
SceneObjectGroup sceneOb =
|
||||
new SceneObjectGroup(this, m_regionHandle, ownerID, PrimIDAllocate(), pos, rot, shape);
|
||||
AddSceneObject(sceneOb, true);
|
||||
|
||||
SceneObjectPart rootPart = sceneOb.GetChildPart(sceneOb.UUID);
|
||||
// if grass or tree, make phantom
|
||||
//rootPart.TrimPermissions();
|
||||
@@ -1591,9 +1593,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
if (rootPart.Shape.PCode != (byte)PCode.Grass)
|
||||
AdaptTree(ref shape);
|
||||
}
|
||||
// if not phantom, add to physics
|
||||
sceneOb.ApplyPhysics(m_physicalPrim);
|
||||
m_innerScene.AddToUpdateList(sceneOb);
|
||||
|
||||
AddSceneObject(sceneOb, true);
|
||||
|
||||
return sceneOb;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user