diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/AgentCircuitData.cs | 4 | ||||
-rw-r--r-- | OpenSim/Framework/ChildAgentDataUpdate.cs | 27 |
2 files changed, 23 insertions, 8 deletions
diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs index 098b33c..640a646 100644 --- a/OpenSim/Framework/AgentCircuitData.cs +++ b/OpenSim/Framework/AgentCircuitData.cs | |||
@@ -351,8 +351,8 @@ namespace OpenSim.Framework | |||
351 | OSDArray wears = (OSDArray)(args["wearables"]); | 351 | OSDArray wears = (OSDArray)(args["wearables"]); |
352 | for (int i = 0; i < wears.Count / 2; i++) | 352 | for (int i = 0; i < wears.Count / 2; i++) |
353 | { | 353 | { |
354 | Appearance.Wearables[i].ItemID = wears[i*2].AsUUID(); | 354 | AvatarWearable awear = new AvatarWearable(wears[i*2].AsUUID(),wears[(i*2)+1].AsUUID()); |
355 | Appearance.Wearables[i].AssetID = wears[(i*2)+1].AsUUID(); | 355 | Appearance.SetWearable(i,awear); |
356 | } | 356 | } |
357 | } | 357 | } |
358 | 358 | ||
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs index 215682f..66487f7 100644 --- a/OpenSim/Framework/ChildAgentDataUpdate.cs +++ b/OpenSim/Framework/ChildAgentDataUpdate.cs | |||
@@ -28,6 +28,8 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Reflection; | ||
32 | using log4net; | ||
31 | using OpenMetaverse; | 33 | using OpenMetaverse; |
32 | using OpenMetaverse.StructuredData; | 34 | using OpenMetaverse.StructuredData; |
33 | 35 | ||
@@ -310,6 +312,12 @@ namespace OpenSim.Framework | |||
310 | // Appearance | 312 | // Appearance |
311 | public AvatarAppearance Appearance; | 313 | public AvatarAppearance Appearance; |
312 | 314 | ||
315 | // DEBUG ON | ||
316 | private static readonly ILog m_log = | ||
317 | LogManager.GetLogger( | ||
318 | MethodBase.GetCurrentMethod().DeclaringType); | ||
319 | // DEBUG OFF | ||
320 | |||
313 | /* | 321 | /* |
314 | public byte[] AgentTextures; | 322 | public byte[] AgentTextures; |
315 | public byte[] VisualParams; | 323 | public byte[] VisualParams; |
@@ -323,6 +331,10 @@ namespace OpenSim.Framework | |||
323 | 331 | ||
324 | public virtual OSDMap Pack() | 332 | public virtual OSDMap Pack() |
325 | { | 333 | { |
334 | // DEBUG ON | ||
335 | m_log.WarnFormat("[CHILDAGENTDATAUPDATE] Pack data"); | ||
336 | // DEBUG OFF | ||
337 | |||
326 | OSDMap args = new OSDMap(); | 338 | OSDMap args = new OSDMap(); |
327 | args["message_type"] = OSD.FromString("AgentData"); | 339 | args["message_type"] = OSD.FromString("AgentData"); |
328 | 340 | ||
@@ -444,6 +456,10 @@ namespace OpenSim.Framework | |||
444 | /// <param name="hash"></param> | 456 | /// <param name="hash"></param> |
445 | public virtual void Unpack(OSDMap args) | 457 | public virtual void Unpack(OSDMap args) |
446 | { | 458 | { |
459 | // DEBUG ON | ||
460 | m_log.WarnFormat("[CHILDAGENTDATAUPDATE] Unpack data"); | ||
461 | // DEBUG OFF | ||
462 | |||
447 | if (args.ContainsKey("region_id")) | 463 | if (args.ContainsKey("region_id")) |
448 | UUID.TryParse(args["region_id"].AsString(), out RegionID); | 464 | UUID.TryParse(args["region_id"].AsString(), out RegionID); |
449 | 465 | ||
@@ -556,10 +572,9 @@ namespace OpenSim.Framework | |||
556 | // AgentTextures[i++] = o.AsUUID(); | 572 | // AgentTextures[i++] = o.AsUUID(); |
557 | //} | 573 | //} |
558 | 574 | ||
559 | |||
560 | Appearance = new AvatarAppearance(AgentID); | 575 | Appearance = new AvatarAppearance(AgentID); |
561 | 576 | ||
562 | // The code to pack textures, visuals, wearables and attachments | 577 | // The code to unpack textures, visuals, wearables and attachments |
563 | // should be removed; packed appearance contains the full appearance | 578 | // should be removed; packed appearance contains the full appearance |
564 | // This is retained for backward compatibility only | 579 | // This is retained for backward compatibility only |
565 | if (args["texture_entry"] != null) | 580 | if (args["texture_entry"] != null) |
@@ -577,8 +592,8 @@ namespace OpenSim.Framework | |||
577 | OSDArray wears = (OSDArray)(args["wearables"]); | 592 | OSDArray wears = (OSDArray)(args["wearables"]); |
578 | for (int i = 0; i < wears.Count / 2; i++) | 593 | for (int i = 0; i < wears.Count / 2; i++) |
579 | { | 594 | { |
580 | Appearance.Wearables[i].ItemID = wears[i*2].AsUUID(); | 595 | AvatarWearable awear = new AvatarWearable(wears[i*2].AsUUID(),wears[(i*2)+1].AsUUID()); |
581 | Appearance.Wearables[i].AssetID = wears[(i*2)+1].AsUUID(); | 596 | Appearance.SetWearable(i,awear); |
582 | } | 597 | } |
583 | } | 598 | } |
584 | 599 | ||
@@ -602,8 +617,8 @@ namespace OpenSim.Framework | |||
602 | Appearance = new AvatarAppearance(AgentID,(OSDMap)args["packed_appearance"]); | 617 | Appearance = new AvatarAppearance(AgentID,(OSDMap)args["packed_appearance"]); |
603 | // DEBUG ON | 618 | // DEBUG ON |
604 | else | 619 | else |
605 | System.Console.WriteLine("No packed appearance in AgentUpdate"); | 620 | m_log.WarnFormat("[CHILDAGENTDATAUPDATE] No packed appearance"); |
606 | // DEBUG OFF | 621 | // DEBUG OFF |
607 | 622 | ||
608 | if ((args["controllers"] != null) && (args["controllers"]).Type == OSDType.Array) | 623 | if ((args["controllers"] != null) && (args["controllers"]).Type == OSDType.Array) |
609 | { | 624 | { |