mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
When a mesh object is added to a scene, delay adding the physics actor until the sculpt data has been added to the shape (possibly via an async asset service request)
This prevents spurious 'no asset data' for meshes added on startup.
This commit is contained in:
@@ -1751,8 +1751,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
SceneObjectPart rootPart = group.GetChildPart(group.UUID);
|
||||
rootPart.Flags &= ~PrimFlags.Scripted;
|
||||
rootPart.TrimPermissions();
|
||||
group.CheckSculptAndLoad();
|
||||
//rootPart.DoPhysicsPropertyUpdate(UsePhysics, true);
|
||||
|
||||
// Don't do this here - it will get done later on when sculpt data is loaded.
|
||||
// group.CheckSculptAndLoad();
|
||||
}
|
||||
|
||||
m_log.Info("[SCENE]: Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)");
|
||||
|
||||
@@ -584,7 +584,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
part.ParentID = m_rootPart.LocalId;
|
||||
//m_log.DebugFormat("[SCENE]: Given local id {0} to part {1}, linknum {2}, parent {3} {4}", part.LocalId, part.UUID, part.LinkNum, part.ParentID, part.ParentUUID);
|
||||
}
|
||||
|
||||
|
||||
ApplyPhysics(m_scene.m_physicalPrim);
|
||||
|
||||
// Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled
|
||||
|
||||
@@ -1896,7 +1896,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
|
||||
// If this part is a sculpt then delay the physics update until we've asynchronously loaded the
|
||||
// mesh data.
|
||||
if (((OpenMetaverse.SculptType)Shape.SculptType) == SculptType.Mesh)
|
||||
CheckSculptAndLoad();
|
||||
else
|
||||
m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user