aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Util.cs12
1 files changed, 5 insertions, 7 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index d7dcf19..de42bf8 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -730,10 +730,10 @@ namespace OpenSim.Framework
730 // used for RemoteParcelRequest (for "About Landmark") 730 // used for RemoteParcelRequest (for "About Landmark")
731 public static UUID BuildFakeParcelID(ulong regionHandle, uint x, uint y) { 731 public static UUID BuildFakeParcelID(ulong regionHandle, uint x, uint y) {
732 byte[] bytes = { 732 byte[] bytes = {
733 (byte)(regionHandle >> 56), (byte)(regionHandle >> 48), (byte)(regionHandle >> 40), (byte)(regionHandle >> 32), 733 (byte)regionHandle, (byte)(regionHandle >> 8), (byte)(regionHandle >> 16), (byte)(regionHandle >> 24),
734 (byte)(regionHandle >> 24), (byte)(regionHandle >> 16), (byte)(regionHandle >> 8), (byte)regionHandle, 734 (byte)(regionHandle >> 32), (byte)(regionHandle >> 40), (byte)(regionHandle >> 48), (byte)(regionHandle << 56),
735 (byte)(x >> 24), (byte)(x >> 16), (byte)(x >> 8), (byte)x, 735 (byte)x, (byte)(x >> 8), (byte)(x >> 16), (byte)(x >> 24),
736 (byte)(y >> 24), (byte)(y >> 16), (byte)(y >> 8), (byte)y }; 736 (byte)y, (byte)(y >> 8), (byte)(y >> 16), (byte)(y >> 24) };
737 return new UUID(bytes, 0); 737 return new UUID(bytes, 0);
738 } 738 }
739 739
@@ -741,9 +741,7 @@ namespace OpenSim.Framework
741 byte[] bytes = parcelID.GetBytes(); 741 byte[] bytes = parcelID.GetBytes();
742 regionHandle = Helpers.BytesToUInt64(bytes); 742 regionHandle = Helpers.BytesToUInt64(bytes);
743 x = Helpers.BytesToUInt(bytes, 8); 743 x = Helpers.BytesToUInt(bytes, 8);
744 // grrr. I'd like to use that code in the next line, but libsl has an off-by-one bug here and returns 0. 744 y = Helpers.BytesToUInt(bytes, 12);
745 //uint y = Helpers.BytesToUInt(bytes, 12);
746 y = (uint)((bytes[12] << 24) | (bytes[13] << 16) | (bytes[14] << 8) | bytes[15]);
747 } 745 }
748 } 746 }
749} 747}