aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authordiva2009-02-22 01:26:11 +0000
committerdiva2009-02-22 01:26:11 +0000
commit99b051ccbe7b0f43e8bd5cc8c0012b40e24cb752 (patch)
treef303bef4e1b7ed4d2d576c1e7fd05f7ceb644ee5 /OpenSim/Region/Framework
parentUpdate svn properties, add copyright headers, minor formatting cleanup. (diff)
downloadopensim-SC_OLD-99b051ccbe7b0f43e8bd5cc8c0012b40e24cb752.zip
opensim-SC_OLD-99b051ccbe7b0f43e8bd5cc8c0012b40e24cb752.tar.gz
opensim-SC_OLD-99b051ccbe7b0f43e8bd5cc8c0012b40e24cb752.tar.bz2
opensim-SC_OLD-99b051ccbe7b0f43e8bd5cc8c0012b40e24cb752.tar.xz
Addresses some issues with appearance after TPs. Appearance.Owner was not being set, and that's what's being used in SendAppearanceToOtherAgent. Mantis #3204.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs12
2 files changed, 9 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 9144bb9..0caec5b 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2118,7 +2118,7 @@ namespace OpenSim.Region.Framework.Scenes
2118 if (appearance == null) 2118 if (appearance == null)
2119 { 2119 {
2120 m_log.DebugFormat("[APPEARANCE]: Appearance not found in {0}, returning default", RegionInfo.RegionName); 2120 m_log.DebugFormat("[APPEARANCE]: Appearance not found in {0}, returning default", RegionInfo.RegionName);
2121 appearance = new AvatarAppearance(); 2121 appearance = new AvatarAppearance(client.AgentId);
2122 } 2122 }
2123 2123
2124 } 2124 }
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 62aae2c..429b615 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -854,7 +854,7 @@ namespace OpenSim.Region.Framework.Scenes
854 { 854 {
855 m_log.ErrorFormat("[SCENE PRESENCE]: null appearance in MakeRoot in {0}", Scene.RegionInfo.RegionName); 855 m_log.ErrorFormat("[SCENE PRESENCE]: null appearance in MakeRoot in {0}", Scene.RegionInfo.RegionName);
856 // emergency; this really shouldn't happen 856 // emergency; this really shouldn't happen
857 m_appearance = new AvatarAppearance(); 857 m_appearance = new AvatarAppearance(UUID);
858 } 858 }
859 859
860 // Don't send an animation pack here, since on a region crossing this will sometimes cause a flying 860 // Don't send an animation pack here, since on a region crossing this will sometimes cause a flying
@@ -2708,15 +2708,19 @@ namespace OpenSim.Region.Framework.Scenes
2708 try 2708 try
2709 { 2709 {
2710 AvatarWearable[] wearables = new AvatarWearable[cAgent.AgentTextures.Length / 2]; 2710 AvatarWearable[] wearables = new AvatarWearable[cAgent.AgentTextures.Length / 2];
2711 Primitive.TextureEntry te = new Primitive.TextureEntry(UUID.Random());
2712 for (uint n = 0; n < cAgent.AgentTextures.Length; n += 2) 2711 for (uint n = 0; n < cAgent.AgentTextures.Length; n += 2)
2713 { 2712 {
2714 UUID itemId = cAgent.AgentTextures[n]; 2713 UUID itemId = cAgent.AgentTextures[n];
2715 UUID assetId = cAgent.AgentTextures[n + 1]; 2714 UUID assetId = cAgent.AgentTextures[n + 1];
2716 wearables[i] = new AvatarWearable(itemId, assetId); 2715 wearables[i++] = new AvatarWearable(itemId, assetId);
2717 te.CreateFace(i++).TextureID = assetId; 2716 //te.CreateFace(i++).TextureID = assetId;
2718 } 2717 }
2719 m_appearance.Wearables = wearables; 2718 m_appearance.Wearables = wearables;
2719
2720 // We're setting it here to default, but the viewer will soon send a SetAppearance that will
2721 // set things straight. We should probably pass these textures too...
2722 Primitive.TextureEntry te = AvatarAppearance.GetDefaultTexture(); //new Primitive.TextureEntry(UUID.Random());
2723
2720 m_appearance.SetAppearance(te.ToBytes(), new List<byte>(cAgent.VisualParams)); 2724 m_appearance.SetAppearance(te.ToBytes(), new List<byte>(cAgent.VisualParams));
2721 } 2725 }
2722 catch (Exception e) 2726 catch (Exception e)