Skip to content

Commit fa59efa

Browse files
committed
fix: Correct information sent in AvatarSitResponse
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.
1 parent 679d396 commit fa59efa

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

OpenSim/Region/Framework/Scenes/ScenePresence.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2605,7 +2605,7 @@ private void SendSitResponse(IClientAPI remoteClient, UUID targetID, Vector3 off
26052605
SceneObjectPart rootPart = part.ParentGroup.RootPart;
26062606
vParentID = rootPart.UUID; // parentID to send to viewer, always the root prim
26072607
vPos = Vector3.Zero; // viewer position of avatar relative to root prim
2608-
vRot = Quaternion.Identity; // viewer rotation of avatar relative to root prim
2608+
vRot = m_sitTargetCorrectionMode == SitTargetCorrectionMode.SecondLife ? rootPart.RotationOffset : Quaternion.Identity; // viewer rotation of avatar relative to root prim
26092609
avSitPos = Vector3.Zero;
26102610
avSitRot = rootPart.RotationOffset;
26112611

@@ -2630,6 +2630,10 @@ private void SendSitResponse(IClientAPI remoteClient, UUID targetID, Vector3 off
26302630
{
26312631
avSitPos += sitInfo.Offset + m_sitTargetCorrectionPrimSpaceOffset + m_sitTargetCorrectionAgentSpaceOffset * sitInfo.Rotation;
26322632
avSitRot *= sitInfo.Rotation;
2633+
if (m_sitTargetCorrectionMode == SitTargetCorrectionMode.SecondLife)
2634+
{
2635+
vPos += sitInfo.Offset + m_sitTargetCorrectionPrimSpaceOffset + m_sitTargetCorrectionAgentSpaceOffset * sitInfo.Rotation;
2636+
}
26332637
vRot *= sitInfo.Rotation;
26342638
}
26352639
else

0 commit comments

Comments
 (0)