Skip to content

Commit

Permalink
fix: Correct information sent in AvatarSitResponse
Browse files Browse the repository at this point in the history
This now matches SL's response to the same inputs as verified by reviewing the Alchemy Message Log response after setting up identical tests in both grids.
  • Loading branch information
kf6kjg committed Jun 9, 2021
1 parent 0d235d8 commit 4e598d9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion OpenSim/Region/Framework/Scenes/ScenePresence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2605,7 +2605,7 @@ private void SendSitResponse(IClientAPI remoteClient, UUID targetID, Vector3 off
SceneObjectPart rootPart = part.ParentGroup.RootPart;
vParentID = rootPart.UUID; // parentID to send to viewer, always the root prim
vPos = Vector3.Zero; // viewer position of avatar relative to root prim
vRot = Quaternion.Identity; // viewer rotation of avatar relative to root prim
vRot = m_sitTargetCorrectionMode == SitTargetCorrectionMode.SecondLife ? rootPart.RotationOffset : Quaternion.Identity; // viewer rotation of avatar relative to root prim
avSitPos = Vector3.Zero;
avSitRot = rootPart.RotationOffset;

Expand All @@ -2630,6 +2630,10 @@ private void SendSitResponse(IClientAPI remoteClient, UUID targetID, Vector3 off
{
avSitPos += sitInfo.Offset + m_sitTargetCorrectionPrimSpaceOffset + m_sitTargetCorrectionAgentSpaceOffset * sitInfo.Rotation;
avSitRot *= sitInfo.Rotation;
if (m_sitTargetCorrectionMode == SitTargetCorrectionMode.SecondLife)
{
vPos += sitInfo.Offset + m_sitTargetCorrectionPrimSpaceOffset + m_sitTargetCorrectionAgentSpaceOffset * sitInfo.Rotation;
}
vRot *= sitInfo.Rotation;
}
else
Expand Down

0 comments on commit 4e598d9

Please sign in to comment.