diff options
author | Diva Canto | 2010-11-29 09:58:20 -0800 |
---|---|---|
committer | Diva Canto | 2010-11-29 09:58:20 -0800 |
commit | f3835fe15c91ece4ad61ba1caa67603374ad2574 (patch) | |
tree | bed4cf2014aeea194086d940e8c86ac998bc692a /OpenSim/Framework/AssetLandmark.cs | |
parent | Fix unit test. (diff) | |
parent | Fix the build break (diff) | |
download | opensim-SC_OLD-f3835fe15c91ece4ad61ba1caa67603374ad2574.zip opensim-SC_OLD-f3835fe15c91ece4ad61ba1caa67603374ad2574.tar.gz opensim-SC_OLD-f3835fe15c91ece4ad61ba1caa67603374ad2574.tar.bz2 opensim-SC_OLD-f3835fe15c91ece4ad61ba1caa67603374ad2574.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/AssetLandmark.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Framework/AssetLandmark.cs b/OpenSim/Framework/AssetLandmark.cs index 7806c1f..f433235 100644 --- a/OpenSim/Framework/AssetLandmark.cs +++ b/OpenSim/Framework/AssetLandmark.cs | |||
@@ -51,8 +51,16 @@ namespace OpenSim.Framework | |||
51 | string[] parts = temp.Split('\n'); | 51 | string[] parts = temp.Split('\n'); |
52 | int.TryParse(parts[0].Substring(17, 1), out Version); | 52 | int.TryParse(parts[0].Substring(17, 1), out Version); |
53 | UUID.TryParse(parts[1].Substring(10, 36), out RegionID); | 53 | UUID.TryParse(parts[1].Substring(10, 36), out RegionID); |
54 | // the vector is stored with spaces as separators, not with commas ("10.3 32.5 43" instead of "10.3, 32.5, 43") | 54 | // The position is a vector with spaces as separators ("10.3 32.5 43"). |
55 | Vector3.TryParse(parts[2].Substring(10, parts[2].Length - 10).Replace(" ", ","), out Position); | 55 | // Parse each scalar separately to take into account the system's culture setting. |
56 | string[] scalars = parts[2].Substring(10, parts[2].Length - 10).Split(' '); | ||
57 | if (scalars.Length > 0) | ||
58 | System.Single.TryParse(scalars[0], out Position.X); | ||
59 | if (scalars.Length > 1) | ||
60 | System.Single.TryParse(scalars[1], out Position.Y); | ||
61 | if (scalars.Length > 2) | ||
62 | System.Single.TryParse(scalars[2], out Position.Z); | ||
63 | |||
56 | ulong.TryParse(parts[3].Substring(14, parts[3].Length - 14), out RegionHandle); | 64 | ulong.TryParse(parts[3].Substring(14, parts[3].Length - 14), out RegionHandle); |
57 | } | 65 | } |
58 | } | 66 | } |