Thank you, HomerHorwitz, for a patch that fixes landmark teleport
and about landmarks with the new OMV types.
This commit is contained in:
Melanie Thielker
2008-09-07 20:09:11 +00:00
parent 0c7e87ee5e
commit 58d79b33ff
4 changed files with 52 additions and 33 deletions

View File

@@ -727,6 +727,21 @@ namespace OpenSim.Framework
return client.Send(url, 6000);
}
/// <summary>
/// Converts a byte array in big endian order into an ulong.
/// </summary>
/// <param name="bytes">
/// The array of bytes
/// </param>
/// <returns>
/// The extracted ulong
/// </returns>
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 = {