Adjust the code for ghost prim removal to new information from Kitto

avinationmerge
Melanie Thielker 2010-09-14 22:13:44 +02:00
parent d299f8b55c
commit cc290abf7a
1 changed files with 7 additions and 3 deletions

View File

@ -1789,11 +1789,15 @@ namespace OpenSim.Region.Framework.Scenes
if (m_rootPart.PhysActor != null && if (m_rootPart.PhysActor != null &&
(!m_rootPart.PhysActor.IsPhysical)) (!m_rootPart.PhysActor.IsPhysical))
{ {
// Possible ghost prim
if (m_rootPart.PhysActor.Position != m_rootPart.GroupPosition) if (m_rootPart.PhysActor.Position != m_rootPart.GroupPosition)
{ {
m_rootPart.PhysActor.Position = m_rootPart.GroupPosition; foreach (SceneObjectPart part in Children.Values)
m_rootPart.PhysActor.Orientation = m_rootPart.RotationOffset; {
m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); // Re-set physics actor positions and
// orientations
part.GroupPosition = m_rootPart.GroupPosition;
}
} }
} }
// m_log.DebugFormat( // m_log.DebugFormat(