diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 410cd87b52..60d4c4f609 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3443,9 +3443,10 @@ namespace OpenSim.Region.Framework.Scenes } } + sitOrientation = part.ParentGroup.RootPart.RotationOffset * sitOrientation; ControllingClient.SendSitResponse( - part.ParentGroup.UUID, offset, sitOrientation * part.ParentGroup.RootPart.RotationOffset, - true, cameraAtOffset, cameraEyeOffset, forceMouselook); + part.ParentGroup.UUID, offset, sitOrientation, + true, cameraAtOffset, cameraEyeOffset, forceMouselook); m_requestedSitTargetUUID = part.UUID; @@ -3590,7 +3591,7 @@ namespace OpenSim.Region.Framework.Scenes m_bodyRot = Orientation; m_pos = offset; - Orientation *= part.ParentGroup.RootPart.RotationOffset; + Orientation = part.ParentGroup.RootPart.RotationOffset * Orientation; ControllingClient.SendSitResponse( part.ParentGroup.UUID, offset, Orientation, true, cameraAtOffset, cameraEyeOffset, part.GetForceMouselook()); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index aa38b77606..d6adddd0cd 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -5738,5 +5738,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { return m_host.StandOffset; } + + public LSL_Vector osGetLinkStandTarget(LSL_Integer linkNumber) + { + if (linkNumber == ScriptBaseClass.LINK_THIS) + return m_host.StandOffset; + if (linkNumber < 0) + return Vector3.Zero; + if (linkNumber < 2) + return m_host.ParentGroup.RootPart.StandOffset; + SceneObjectPart target = m_host.ParentGroup.GetLinkNumPart(linkNumber); + if (target == null) + return Vector3.Zero; + return target.StandOffset; + } } } \ No newline at end of file diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 5b7cb50a2f..c25057e276 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs @@ -566,5 +566,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces LSL_Float osGetLinkSitActiveRange(LSL_Integer linkNumber); void osSetStandTarget(vector v); vector osGetStandTarget(); + vector osGetLinkStandTarget(LSL_Integer linkNumber); } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 3a304c8634..b4a7f0675f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs @@ -1448,9 +1448,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase } public vector osGetStandTarget() - { return m_OSSL_Functions.osGetStandTarget(); } + + public vector osGetLinkStandTarget(LSL_Integer linkNumber) + { + return m_OSSL_Functions.osGetLinkStandTarget(linkNumber); + } } }