Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork

avinationmerge
ubit 2013-01-09 18:03:04 +01:00
commit f392fa96c3
2 changed files with 30 additions and 3 deletions

View File

@ -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

View File

@ -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;