From 4de82891a9c1219fd798fc005f5dea4dc7ea13f2 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 13 Jan 2010 09:34:08 -0800 Subject: Bug in Teleport fixed -- Appearance was missing from AgentCircuitData. --- OpenSim/Framework/AgentCircuitData.cs | 38 +++++++++++++--------- .../Hypergrid/HGSceneCommunicationService.cs | 2 ++ .../Framework/Scenes/SceneCommunicationService.cs | 1 + 3 files changed, 25 insertions(+), 16 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs index ad29950..e655aa4 100644 --- a/OpenSim/Framework/AgentCircuitData.cs +++ b/OpenSim/Framework/AgentCircuitData.cs @@ -157,28 +157,34 @@ namespace OpenSim.Framework args["start_pos"] = OSD.FromString(startpos.ToString()); args["appearance_serial"] = OSD.FromInteger(Appearance.Serial); - // We might not pass this in all cases... - if ((Appearance.Wearables != null) && (Appearance.Wearables.Length > 0)) + if (Appearance != null) { - OSDArray wears = new OSDArray(Appearance.Wearables.Length); - foreach (AvatarWearable awear in Appearance.Wearables) + //System.Console.WriteLine("XXX Before packing Wearables"); + if ((Appearance.Wearables != null) && (Appearance.Wearables.Length > 0)) { - wears.Add(OSD.FromUUID(awear.ItemID)); - wears.Add(OSD.FromUUID(awear.AssetID)); + OSDArray wears = new OSDArray(Appearance.Wearables.Length * 2); + foreach (AvatarWearable awear in Appearance.Wearables) + { + wears.Add(OSD.FromUUID(awear.ItemID)); + wears.Add(OSD.FromUUID(awear.AssetID)); + //System.Console.WriteLine("XXX ItemID=" + awear.ItemID + " assetID=" + awear.AssetID); + } + args["wearables"] = wears; } - args["wearables"] = wears; - } - Dictionary attachments = Appearance.GetAttachmentDictionary(); - if ((attachments != null) && (attachments.Count > 0)) - { - OSDArray attachs = new OSDArray(attachments.Count); - foreach (KeyValuePair kvp in attachments) + //System.Console.WriteLine("XXX Before packing Attachments"); + Dictionary attachments = Appearance.GetAttachmentDictionary(); + if ((attachments != null) && (attachments.Count > 0)) { - AttachmentData adata = new AttachmentData(kvp.Key, kvp.Value[0], kvp.Value[1]); - attachs.Add(adata.PackUpdateMessage()); + OSDArray attachs = new OSDArray(attachments.Count); + foreach (KeyValuePair kvp in attachments) + { + AttachmentData adata = new AttachmentData(kvp.Key, kvp.Value[0], kvp.Value[1]); + attachs.Add(adata.PackUpdateMessage()); + //System.Console.WriteLine("XXX att.pt=" + kvp.Key + "; itemID=" + kvp.Value[0] + "; assetID=" + kvp.Value[1]); + } + args["attachments"] = attachs; } - args["attachments"] = attachs; } return args; diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs index e7a97f1..2821be2 100644 --- a/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs @@ -189,6 +189,8 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid agentCircuit.InventoryFolder = UUID.Zero; agentCircuit.startpos = position; agentCircuit.child = true; + agentCircuit.Appearance = avatar.Appearance; + if (Util.IsOutsideView(oldRegionX, newRegionX, oldRegionY, newRegionY)) { // brand new agent, let's create a new caps seed diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 63719ac..f99df29 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs @@ -803,6 +803,7 @@ namespace OpenSim.Region.Framework.Scenes agentCircuit.InventoryFolder = UUID.Zero; agentCircuit.startpos = position; agentCircuit.child = true; + agentCircuit.Appearance = avatar.Appearance; if (Util.IsOutsideView(oldRegionX, newRegionX, oldRegionY, newRegionY)) { -- cgit v1.1