aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorMelanie Thielker2008-09-07 20:09:11 +0000
committerMelanie Thielker2008-09-07 20:09:11 +0000
commit58d79b33ff507a1d861d1196a925d2d09ad1c3f2 (patch)
tree0b4c898b5885bb2c6d16346744f06f8c4b17fe77 /OpenSim/Framework
parentReturn 0 for no wind and 0 for no clouds from (diff)
downloadopensim-SC-58d79b33ff507a1d861d1196a925d2d09ad1c3f2.zip
opensim-SC-58d79b33ff507a1d861d1196a925d2d09ad1c3f2.tar.gz
opensim-SC-58d79b33ff507a1d861d1196a925d2d09ad1c3f2.tar.bz2
opensim-SC-58d79b33ff507a1d861d1196a925d2d09ad1c3f2.tar.xz
Mantis #2142
Thank you, HomerHorwitz, for a patch that fixes landmark teleport and about landmarks with the new OMV types.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/AssetLandmark.cs3
-rw-r--r--OpenSim/Framework/Util.cs15
2 files changed, 17 insertions, 1 deletions
diff --git a/OpenSim/Framework/AssetLandmark.cs b/OpenSim/Framework/AssetLandmark.cs
index cf663ee..d636d34 100644
--- a/OpenSim/Framework/AssetLandmark.cs
+++ b/OpenSim/Framework/AssetLandmark.cs
@@ -53,7 +53,8 @@ namespace OpenSim.Framework
53 string[] parts = temp.Split('\n'); 53 string[] parts = temp.Split('\n');
54 int.TryParse(parts[0].Substring(17, 1), out Version); 54 int.TryParse(parts[0].Substring(17, 1), out Version);
55 UUID.TryParse(parts[1].Substring(10, 36), out RegionID); 55 UUID.TryParse(parts[1].Substring(10, 36), out RegionID);
56 Vector3.TryParse(parts[2].Substring(10, parts[2].Length - 10), out Position); 56 // the vector is stored with spaces as separators, not with commas ("10.3 32.5 43" instead of "10.3, 32.5, 43")
57 Vector3.TryParse(parts[2].Substring(10, parts[2].Length - 10).Replace(" ", ","), out Position);
57 ulong.TryParse(parts[3].Substring(14, parts[3].Length - 14), out RegionHandle); 58 ulong.TryParse(parts[3].Substring(14, parts[3].Length - 14), out RegionHandle);
58 } 59 }
59 } 60 }
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
727 return client.Send(url, 6000); 727 return client.Send(url, 6000);
728 } 728 }
729 729
730 /// <summary>
731 /// Converts a byte array in big endian order into an ulong.
732 /// </summary>
733 /// <param name="bytes">
734 /// The array of bytes
735 /// </param>
736 /// <returns>
737 /// The extracted ulong
738 /// </returns>
739 public static ulong BytesToUInt64Big(byte[] bytes) {
740 if(bytes.Length < 8) return 0;
741 return ((ulong)bytes[0] << 56) | ((ulong)bytes[1] << 48) | ((ulong)bytes[2] << 40) | ((ulong)bytes[3] << 32) |
742 ((ulong)bytes[4] << 24) | ((ulong)bytes[5] << 16) | ((ulong)bytes[6] << 8) | (ulong)bytes[7];
743 }
744
730 // used for RemoteParcelRequest (for "About Landmark") 745 // used for RemoteParcelRequest (for "About Landmark")
731 public static UUID BuildFakeParcelID(ulong regionHandle, uint x, uint y) { 746 public static UUID BuildFakeParcelID(ulong regionHandle, uint x, uint y) {
732 byte[] bytes = { 747 byte[] bytes = {