diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index f6146a9171..b06788b199 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs @@ -103,6 +103,7 @@ namespace OpenSim.Region.ClientStack.Linden private static readonly string m_getObjectPhysicsDataPath = "0101/"; private static readonly string m_getObjectCostPath = "0102/"; private static readonly string m_ResourceCostSelectedPath = "0103/"; + private static readonly string m_UpdateAgentInformationPath = "0500/"; // These are callbacks which will be setup by the scene so that we can update scene data when we @@ -287,6 +288,8 @@ namespace OpenSim.Region.ClientStack.Linden m_HostCapsObj.RegisterHandler("GetObjectCost", getObjectCostHandler); IRequestHandler ResourceCostSelectedHandler = new RestStreamHandler("POST", capsBase + m_ResourceCostSelectedPath, ResourceCostSelected); m_HostCapsObj.RegisterHandler("ResourceCostSelected", ResourceCostSelectedHandler); + IRequestHandler UpdateAgentInformationHandler = new RestStreamHandler("POST", capsBase + m_UpdateAgentInformationPath, UpdateAgentInformation); + m_HostCapsObj.RegisterHandler("UpdateAgentInformation", UpdateAgentInformationHandler); m_HostCapsObj.RegisterHandler( "CopyInventoryFromNotecard", @@ -1438,6 +1441,22 @@ namespace OpenSim.Region.ClientStack.Linden string response = OSDParser.SerializeLLSDXmlString(resp); return response; } + + public string UpdateAgentInformation(string request, string path, + string param, IOSHttpRequest httpRequest, + IOSHttpResponse httpResponse) + { + OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request); + OSDMap resp = new OSDMap(); + + OSDMap accessPrefs = new OSDMap(); + accessPrefs["max"] = "A"; + + resp["access_prefs"] = accessPrefs; + + string response = OSDParser.SerializeLLSDXmlString(resp); + return response; + } } public class AssetUploader diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 7ff30ca844..faa92dcd8f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -2353,8 +2353,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); + + // Teravus: if (m_host.ParentID == 0) is bug code because the ParentID for the Avatar will cause this to be nonzero for root prim attachments + // which is then treated like a child prim rotation and it's offset gets cumulatively multiplied against. + // to fix the scripted rotations we also have to check to see if the root part localid is the same as the host's localid. + // RootPart != null should shortcircuit + // try to let this work as in SL... - if (m_host.ParentID == 0) + if (m_host.ParentID == 0 || (m_host.ParentGroup != null && m_host == m_host.ParentGroup.RootPart)) { // special case: If we are root, rotate complete SOG to new rotation SetRot(m_host, rot); @@ -7911,7 +7917,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api LSL_Rotation q = rules.GetQuaternionItem(idx++); // try to let this work as in SL... - if (part.ParentID == 0) + if (part.ParentID == 0 || (part.ParentGroup != null && part == part.ParentGroup.RootPart)) { // special case: If we are root, rotate complete SOG to new rotation SetRot(part, q); @@ -8744,11 +8750,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api remaining = GetPrimParams(avatar, rules, ref res); } - if (remaining != null && remaining.Length > 0) + if ((object)remaining != null && remaining.Length > 0) { linknumber = remaining.GetLSLIntegerItem(0); rules = remaining.GetSublist(1, -1); } + else + break; } return res;