diff options
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/AgentCircuitData.cs | 35 | ||||
-rw-r--r-- | OpenSim/Framework/AssetLandmark.cs | 12 | ||||
-rw-r--r-- | OpenSim/Framework/ChildAgentDataUpdate.cs | 10 |
3 files changed, 27 insertions, 30 deletions
diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs index cc9fcea..1600bdc 100644 --- a/OpenSim/Framework/AgentCircuitData.cs +++ b/OpenSim/Framework/AgentCircuitData.cs | |||
@@ -302,31 +302,26 @@ namespace OpenSim.Framework | |||
302 | if (args["start_pos"] != null) | 302 | if (args["start_pos"] != null) |
303 | Vector3.TryParse(args["start_pos"].AsString(), out startpos); | 303 | Vector3.TryParse(args["start_pos"].AsString(), out startpos); |
304 | 304 | ||
305 | // DEBUG ON | 305 | m_log.InfoFormat("[AGENTCIRCUITDATA] agentid={0}, child={1}, startpos={2}",AgentID,child,startpos.ToString()); |
306 | m_log.WarnFormat("[AGENTCIRCUITDATA] agentid={0}, child={1}, startpos={2}",AgentID,child,startpos.ToString()); | ||
307 | // DEBUG OFF | ||
308 | 306 | ||
309 | try { | 307 | try { |
310 | // Unpack various appearance elements | 308 | // Unpack various appearance elements |
311 | Appearance = new AvatarAppearance(AgentID); | 309 | Appearance = new AvatarAppearance(AgentID); |
312 | 310 | ||
313 | // Eventually this code should be deprecated, use full appearance | 311 | // Eventually this code should be deprecated, use full appearance |
314 | // packing in packed_appearance | 312 | // packing in packed_appearance |
315 | if (args["appearance_serial"] != null) | 313 | if (args["appearance_serial"] != null) |
316 | Appearance.Serial = args["appearance_serial"].AsInteger(); | 314 | Appearance.Serial = args["appearance_serial"].AsInteger(); |
317 | 315 | ||
318 | if (args.ContainsKey("packed_appearance") && (args["packed_appearance"].Type == OSDType.Map)) | 316 | if (args.ContainsKey("packed_appearance") && (args["packed_appearance"].Type == OSDType.Map)) |
319 | { | 317 | { |
320 | Appearance.Unpack((OSDMap)args["packed_appearance"]); | 318 | Appearance.Unpack((OSDMap)args["packed_appearance"]); |
321 | // DEBUG ON | 319 | m_log.InfoFormat("[AGENTCIRCUITDATA] unpacked appearance"); |
322 | m_log.WarnFormat("[AGENTCIRCUITDATA] unpacked appearance"); | 320 | } |
323 | // DEBUG OFF | 321 | else |
322 | m_log.Warn("[AGENTCIRCUITDATA] failed to find a valid packed_appearance"); | ||
324 | } | 323 | } |
325 | // DEBUG ON | 324 | catch (Exception e) |
326 | else | ||
327 | m_log.Warn("[AGENTCIRCUITDATA] failed to find a valid packed_appearance"); | ||
328 | // DEBUG OFF | ||
329 | } catch (Exception e) | ||
330 | { | 325 | { |
331 | m_log.ErrorFormat("[AGENTCIRCUITDATA] failed to unpack appearance; {0}",e.Message); | 326 | m_log.ErrorFormat("[AGENTCIRCUITDATA] failed to unpack appearance; {0}",e.Message); |
332 | } | 327 | } |
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 | } |
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs index a227338..ce0b2fb 100644 --- a/OpenSim/Framework/ChildAgentDataUpdate.cs +++ b/OpenSim/Framework/ChildAgentDataUpdate.cs | |||
@@ -331,9 +331,7 @@ namespace OpenSim.Framework | |||
331 | 331 | ||
332 | public virtual OSDMap Pack() | 332 | public virtual OSDMap Pack() |
333 | { | 333 | { |
334 | // DEBUG ON | 334 | m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Pack data"); |
335 | m_log.WarnFormat("[CHILDAGENTDATAUPDATE] Pack data"); | ||
336 | // DEBUG OFF | ||
337 | 335 | ||
338 | OSDMap args = new OSDMap(); | 336 | OSDMap args = new OSDMap(); |
339 | args["message_type"] = OSD.FromString("AgentData"); | 337 | args["message_type"] = OSD.FromString("AgentData"); |
@@ -454,9 +452,7 @@ namespace OpenSim.Framework | |||
454 | /// <param name="hash"></param> | 452 | /// <param name="hash"></param> |
455 | public virtual void Unpack(OSDMap args) | 453 | public virtual void Unpack(OSDMap args) |
456 | { | 454 | { |
457 | // DEBUG ON | 455 | m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Unpack data"); |
458 | m_log.WarnFormat("[CHILDAGENTDATAUPDATE] Unpack data"); | ||
459 | // DEBUG OFF | ||
460 | 456 | ||
461 | if (args.ContainsKey("region_id")) | 457 | if (args.ContainsKey("region_id")) |
462 | UUID.TryParse(args["region_id"].AsString(), out RegionID); | 458 | UUID.TryParse(args["region_id"].AsString(), out RegionID); |
@@ -613,10 +609,8 @@ namespace OpenSim.Framework | |||
613 | 609 | ||
614 | if (args.ContainsKey("packed_appearance") && (args["packed_appearance"]).Type == OSDType.Map) | 610 | if (args.ContainsKey("packed_appearance") && (args["packed_appearance"]).Type == OSDType.Map) |
615 | Appearance = new AvatarAppearance(AgentID,(OSDMap)args["packed_appearance"]); | 611 | Appearance = new AvatarAppearance(AgentID,(OSDMap)args["packed_appearance"]); |
616 | // DEBUG ON | ||
617 | else | 612 | else |
618 | m_log.WarnFormat("[CHILDAGENTDATAUPDATE] No packed appearance"); | 613 | m_log.WarnFormat("[CHILDAGENTDATAUPDATE] No packed appearance"); |
619 | // DEBUG OFF | ||
620 | 614 | ||
621 | if ((args["controllers"] != null) && (args["controllers"]).Type == OSDType.Array) | 615 | if ((args["controllers"] != null) && (args["controllers"]).Type == OSDType.Array) |
622 | { | 616 | { |