on linking update linked parts physical flags acording to new parent ones ( untested )

avinationmerge
UbitUmarov 2012-03-09 17:19:10 +00:00
parent 09d99cb222
commit e83a2181d0
1 changed files with 8 additions and 1 deletions

View File

@ -2499,6 +2499,11 @@ namespace OpenSim.Region.Framework.Scenes
if (linkPart.PhysActor != null)
linkPart.PhysActor.Building = true;
// physics flags from group to be applied to linked parts
bool grpusephys = UsesPhysics;
bool grptemporary = IsTemporary;
bool gprphantom = IsPhantom;
Vector3 oldGroupPosition = linkPart.GroupPosition;
Quaternion oldRootRotation = linkPart.RotationOffset;
@ -2542,7 +2547,8 @@ namespace OpenSim.Region.Framework.Scenes
linkPart.SetParent(this);
linkPart.CreateSelected = true;
// let physics know
// let physics know preserve part volume dtc messy since UpdatePrimFlags doesn't look to parent changes for now
linkPart.UpdatePrimFlags(grpusephys, grptemporary, gprphantom, linkPart.VolumeDetectActive, true);
if (linkPart.PhysActor != null && m_rootPart.PhysActor != null && m_rootPart.PhysActor.IsPhysical)
{
linkPart.PhysActor.link(m_rootPart.PhysActor);
@ -2564,6 +2570,7 @@ namespace OpenSim.Region.Framework.Scenes
{
LinkNonRootPart(part, oldGroupPosition, oldRootRotation, linkNum++);
// let physics know
part.UpdatePrimFlags(grpusephys, grptemporary, gprphantom, part.VolumeDetectActive, true);
if (part.PhysActor != null && m_rootPart.PhysActor != null && m_rootPart.PhysActor.IsPhysical)
{
part.PhysActor.link(m_rootPart.PhysActor);