aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs
diff options
context:
space:
mode:
authorCharles Krinke2008-08-16 19:20:14 +0000
committerCharles Krinke2008-08-16 19:20:14 +0000
commitd9cc908471922a1239bb8a757e07084072852982 (patch)
tree3390870e039a51194efa9c2e1e20142c9266dddd /OpenSim/Framework/Util.cs
parent* Fix a rare maptile shading error, terrain difference mod 1 = 0 + abs = oops. (diff)
downloadopensim-SC_OLD-d9cc908471922a1239bb8a757e07084072852982.zip
opensim-SC_OLD-d9cc908471922a1239bb8a757e07084072852982.tar.gz
opensim-SC_OLD-d9cc908471922a1239bb8a757e07084072852982.tar.bz2
opensim-SC_OLD-d9cc908471922a1239bb8a757e07084072852982.tar.xz
Mantis#1965. Thank you kindly, HomerHorwitz for a patch that:
Places touched: - Added two events for in-packets to LLCLientView: RegionHandleRequest and ParcelInfoRequest - Added sending of two out-packets to LLCLientView: RegionIDAndHandleReply and ParcelInfoReply. - Scene handles the RegionHandleRequest, LandManagementModule the ParcelInfoRequest - Added inter-region request for LandData by RegionHandle and local position. This was implemented as XML-RPC request. The returned LandData isn't complete, it only contains the data necessary for answering the ParcelInfoRequest - Added new CAPS (0009) for RemoteParcelRequest and some methods for LandData handling to LandManagementModule - Added methods for fake parcelID creation and parsing to Util - Fixed missing implementation of interface methods. - Added new file: OpenSim/Framework/Communications/Capabilities/LLSDRemoteParcelResponse.cs NOTE: This is part of the patch, too. Due to the many places touched, I would consider this patch as experimental.
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r--OpenSim/Framework/Util.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index d72e03e..bc35fa6 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -716,5 +716,24 @@ namespace OpenSim.Framework
716 XmlRpcRequest client = new XmlRpcRequest(methodName, args); 716 XmlRpcRequest client = new XmlRpcRequest(methodName, args);
717 return client.Send(url, 6000); 717 return client.Send(url, 6000);
718 } 718 }
719
720 // used for RemoteParcelRequest (for "About Landmark")
721 public static LLUUID BuildFakeParcelID(ulong regionHandle, uint x, uint y) {
722 byte[] bytes = {
723 (byte)(regionHandle >> 56), (byte)(regionHandle >> 48), (byte)(regionHandle >> 40), (byte)(regionHandle >> 32),
724 (byte)(regionHandle >> 24), (byte)(regionHandle >> 16), (byte)(regionHandle >> 8), (byte)regionHandle,
725 (byte)(x >> 24), (byte)(x >> 16), (byte)(x >> 8), (byte)x,
726 (byte)(y >> 24), (byte)(y >> 16), (byte)(y >> 8), (byte)y };
727 return new LLUUID(bytes, 0);
728 }
729
730 public static void ParseFakeParcelID(LLUUID parcelID, out ulong regionHandle, out uint x, out uint y) {
731 byte[] bytes = parcelID.GetBytes();
732 regionHandle = Helpers.BytesToUInt64(bytes);
733 x = Helpers.BytesToUInt(bytes, 8);
734 // grrr. I'd like to use that code in the next line, but libsl has an off-by-one bug here and returns 0.
735 //uint y = Helpers.BytesToUInt(bytes, 12);
736 y = (uint)((bytes[12] << 24) | (bytes[13] << 16) | (bytes[14] << 8) | bytes[15]);
737 }
719 } 738 }
720} 739}