Refix sitting on child prims by reinserting relevant code back into SP.HandleAgentSit()
parent
82ebb86d58
commit
1d605642f7
|
@ -2868,14 +2868,33 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
m_pos = sitTargetPos + sitOffset + SIT_TARGET_ADJUSTMENT;
|
||||
|
||||
// m_pos = sitTargetPos + SIT_TARGET_ADJUSTMENT - sitOffset;
|
||||
Rotation = sitTargetOrient;
|
||||
Vector3 newPos = sitTargetPos + sitOffset + SIT_TARGET_ADJUSTMENT;
|
||||
Quaternion newRot;
|
||||
|
||||
if (part.IsRoot)
|
||||
{
|
||||
newRot = sitTargetOrient;
|
||||
}
|
||||
else
|
||||
{
|
||||
newPos = newPos * part.RotationOffset;
|
||||
newRot = part.RotationOffset * sitTargetOrient;
|
||||
}
|
||||
|
||||
newPos += part.OffsetPosition;
|
||||
|
||||
m_pos = newPos;
|
||||
Rotation = newRot;
|
||||
|
||||
// ParentPosition = part.AbsolutePosition;
|
||||
part.ParentGroup.AddAvatar(UUID);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pos -= part.AbsolutePosition;
|
||||
// An viewer expects to specify sit positions as offsets to the root prim, even if a child prim is
|
||||
// being sat upon.
|
||||
m_pos -= part.GroupPosition;
|
||||
|
||||
// ParentPosition = part.AbsolutePosition;
|
||||
part.ParentGroup.AddAvatar(UUID);
|
||||
|
||||
|
|
Loading…
Reference in New Issue