From 58d79b33ff507a1d861d1196a925d2d09ad1c3f2 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Sun, 7 Sep 2008 20:09:11 +0000
Subject: Mantis #2142 Thank you, HomerHorwitz, for a patch that fixes landmark
teleport and about landmarks with the new OMV types.
---
OpenSim/Framework/Util.cs | 15 +++++++++++++++
1 file changed, 15 insertions(+)
(limited to 'OpenSim/Framework/Util.cs')
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index de42bf8..427832d 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -727,6 +727,21 @@ namespace OpenSim.Framework
return client.Send(url, 6000);
}
+ ///
+ /// Converts a byte array in big endian order into an ulong.
+ ///
+ ///
+ /// The array of bytes
+ ///
+ ///
+ /// The extracted ulong
+ ///
+ public static ulong BytesToUInt64Big(byte[] bytes) {
+ if(bytes.Length < 8) return 0;
+ return ((ulong)bytes[0] << 56) | ((ulong)bytes[1] << 48) | ((ulong)bytes[2] << 40) | ((ulong)bytes[3] << 32) |
+ ((ulong)bytes[4] << 24) | ((ulong)bytes[5] << 16) | ((ulong)bytes[6] << 8) | (ulong)bytes[7];
+ }
+
// used for RemoteParcelRequest (for "About Landmark")
public static UUID BuildFakeParcelID(ulong regionHandle, uint x, uint y) {
byte[] bytes = {
--
cgit v1.1