diff options
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 568e216..1af61db 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | |||
@@ -96,6 +96,8 @@ namespace OpenSim.Region.ClientStack.Linden | |||
96 | // private static readonly string m_fetchInventoryPath = "0006/"; | 96 | // private static readonly string m_fetchInventoryPath = "0006/"; |
97 | private static readonly string m_copyFromNotecardPath = "0007/"; | 97 | private static readonly string m_copyFromNotecardPath = "0007/"; |
98 | // private static readonly string m_remoteParcelRequestPath = "0009/";// This is in the LandManagementModule. | 98 | // private static readonly string m_remoteParcelRequestPath = "0009/";// This is in the LandManagementModule. |
99 | private static readonly string m_getObjectPhysicsDataPath = "0101/"; | ||
100 | /* 0102 - 0103 RESERVED */ | ||
99 | private static readonly string m_UpdateAgentInformationPath = "0500/"; | 101 | private static readonly string m_UpdateAgentInformationPath = "0500/"; |
100 | 102 | ||
101 | // These are callbacks which will be setup by the scene so that we can update scene data when we | 103 | // These are callbacks which will be setup by the scene so that we can update scene data when we |
@@ -204,6 +206,8 @@ namespace OpenSim.Region.ClientStack.Linden | |||
204 | m_HostCapsObj.RegisterHandler("UpdateNotecardAgentInventory", req); | 206 | m_HostCapsObj.RegisterHandler("UpdateNotecardAgentInventory", req); |
205 | m_HostCapsObj.RegisterHandler("UpdateScriptAgentInventory", req); | 207 | m_HostCapsObj.RegisterHandler("UpdateScriptAgentInventory", req); |
206 | m_HostCapsObj.RegisterHandler("UpdateScriptAgent", req); | 208 | m_HostCapsObj.RegisterHandler("UpdateScriptAgent", req); |
209 | IRequestHandler getObjectPhysicsDataHandler = new RestStreamHandler("POST", capsBase + m_getObjectPhysicsDataPath, GetObjectPhysicsData); | ||
210 | m_HostCapsObj.RegisterHandler("GetObjectPhysicsData", getObjectPhysicsDataHandler); | ||
207 | IRequestHandler UpdateAgentInformationHandler = new RestStreamHandler("POST", capsBase + m_UpdateAgentInformationPath, UpdateAgentInformation); | 211 | IRequestHandler UpdateAgentInformationHandler = new RestStreamHandler("POST", capsBase + m_UpdateAgentInformationPath, UpdateAgentInformation); |
208 | m_HostCapsObj.RegisterHandler("UpdateAgentInformation", UpdateAgentInformationHandler); | 212 | m_HostCapsObj.RegisterHandler("UpdateAgentInformation", UpdateAgentInformationHandler); |
209 | 213 | ||
@@ -873,6 +877,37 @@ namespace OpenSim.Region.ClientStack.Linden | |||
873 | return LLSDHelpers.SerialiseLLSDReply(response); | 877 | return LLSDHelpers.SerialiseLLSDReply(response); |
874 | } | 878 | } |
875 | 879 | ||
880 | public string GetObjectPhysicsData(string request, string path, | ||
881 | string param, IOSHttpRequest httpRequest, | ||
882 | IOSHttpResponse httpResponse) | ||
883 | { | ||
884 | OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request); | ||
885 | OSDMap resp = new OSDMap(); | ||
886 | OSDArray object_ids = (OSDArray)req["object_ids"]; | ||
887 | |||
888 | for (int i = 0 ; i < object_ids.Count ; i++) | ||
889 | { | ||
890 | UUID uuid = object_ids[i].AsUUID(); | ||
891 | |||
892 | SceneObjectPart obj = m_Scene.GetSceneObjectPart(uuid); | ||
893 | if (obj != null) | ||
894 | { | ||
895 | OSDMap object_data = new OSDMap(); | ||
896 | |||
897 | object_data["PhysicsShapeType"] = obj.PhysicsShapeType; | ||
898 | object_data["Density"] = obj.Density; | ||
899 | object_data["Friction"] = obj.Friction; | ||
900 | object_data["Restitution"] = obj.Restitution; | ||
901 | object_data["GravityMultiplier"] = obj.GravityModifier; | ||
902 | |||
903 | resp[uuid.ToString()] = object_data; | ||
904 | } | ||
905 | } | ||
906 | |||
907 | string response = OSDParser.SerializeLLSDXmlString(resp); | ||
908 | return response; | ||
909 | } | ||
910 | |||
876 | public string UpdateAgentInformation(string request, string path, | 911 | public string UpdateAgentInformation(string request, string path, |
877 | string param, IOSHttpRequest httpRequest, | 912 | string param, IOSHttpRequest httpRequest, |
878 | IOSHttpResponse httpResponse) | 913 | IOSHttpResponse httpResponse) |