aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/AssetLandmark.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/AssetLandmark.cs17
1 files changed, 14 insertions, 3 deletions
diff --git a/OpenSim/Framework/AssetLandmark.cs b/OpenSim/Framework/AssetLandmark.cs
index 058b442..103f756 100644
--- a/OpenSim/Framework/AssetLandmark.cs
+++ b/OpenSim/Framework/AssetLandmark.cs
@@ -35,10 +35,11 @@ namespace OpenSim.Framework
35 public Vector3 Position; 35 public Vector3 Position;
36 public ulong RegionHandle; 36 public ulong RegionHandle;
37 public UUID RegionID; 37 public UUID RegionID;
38 public string Gatekeeper = string.Empty;
38 public int Version; 39 public int Version;
39 40
40 public AssetLandmark(AssetBase a) 41 public AssetLandmark(AssetBase a)
41 : base(a.FullID, a.Name, a.Type) 42 : base(a.FullID, a.Name, a.Type, a.Metadata.CreatorID)
42 { 43 {
43 Data = a.Data; 44 Data = a.Data;
44 Description = a.Description; 45 Description = a.Description;
@@ -51,8 +52,18 @@ namespace OpenSim.Framework
51 string[] parts = temp.Split('\n'); 52 string[] parts = temp.Split('\n');
52 int.TryParse(parts[0].Substring(17, 1), out Version); 53 int.TryParse(parts[0].Substring(17, 1), out Version);
53 UUID.TryParse(parts[1].Substring(10, 36), out RegionID); 54 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") 55 if (parts.Length >= 5)
55 Vector3.TryParse(parts[2].Substring(10, parts[2].Length - 10).Replace(" ", ","), out Position); 56 Gatekeeper = parts[4].Replace("gatekeeper ", "");
57 // The position is a vector with spaces as separators ("10.3 32.5 43").
58 // Parse each scalar separately to take into account the system's culture setting.
59 string[] scalars = parts[2].Substring(10, parts[2].Length - 10).Split(' ');
60 if (scalars.Length > 0)
61 System.Single.TryParse(scalars[0], out Position.X);
62 if (scalars.Length > 1)
63 System.Single.TryParse(scalars[1], out Position.Y);
64 if (scalars.Length > 2)
65 System.Single.TryParse(scalars[2], out Position.Z);
66
56 ulong.TryParse(parts[3].Substring(14, parts[3].Length - 14), out RegionHandle); 67 ulong.TryParse(parts[3].Substring(14, parts[3].Length - 14), out RegionHandle);
57 } 68 }
58 } 69 }