From 9389429ed3de0c67e8e708a34c3820ff4f9e8ca0 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 21 May 2008 20:18:40 +0000 Subject: Clean out some crufty in AvatarFactoryModule Fix RequestUpdateInventoryItem so that asset changes generate a new asset, which is needed for editing appearance to do the right thing. Persistant appearance seems to work after this, except you need to rebake textures some times. --- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 23 ++++++++++------------ 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index f70eb45..1aa800a 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -1456,17 +1456,7 @@ namespace OpenSim.Region.Environment.Scenes SendFullUpdateToAllClients(); SendAppearanceToAllOtherAgents(); - SendOwnAppearance(); - } - - - public void SetWearable(IClientAPI client, int wearableId, AvatarWearable wearable) - { - m_log.Info("[APPEARANCE] Setting wearable with client, wearableid, wearable"); - m_appearance.SetWearable(wearableId, wearable); - m_scene.CommsManager.UserService.UpdateUserAppearance(client.AgentId, m_appearance); - client.SendWearables(m_appearance.Wearables, m_appearance.Serial++); - } + } /// /// @@ -1476,6 +1466,11 @@ namespace OpenSim.Region.Environment.Scenes { m_log.Info("[APPEARANCE] Sending Own Appearance"); ControllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); + ControllingClient.SendAppearance( + m_appearance.Owner, + m_appearance.VisualParams, + m_appearance.Texture.ToBytes() + ); } /// @@ -1483,6 +1478,7 @@ namespace OpenSim.Region.Environment.Scenes /// public void SendAppearanceToAllOtherAgents() { + m_log.Info("[APPEARANCE] Sending Appearance to All Other Agents"); m_perfMonMS=System.Environment.TickCount; m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence) @@ -1506,7 +1502,7 @@ namespace OpenSim.Region.Environment.Scenes public void SetAppearance(byte[] texture, List visualParam) { - m_log.Warn("[APPEARANCE] Setting Appearance"); + m_log.Info("[APPEARANCE] Setting Appearance"); m_appearance.SetAppearance(texture, visualParam); SetHeight(m_appearance.AvatarHeight); m_scene.CommsManager.UserService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance); @@ -1517,9 +1513,10 @@ namespace OpenSim.Region.Environment.Scenes public void SetWearable(int wearableId, AvatarWearable wearable) { - m_log.Warn("[APPEARANCE] Setting Wearable"); + m_log.Info("[APPEARANCE] Setting Wearable"); m_appearance.SetWearable(wearableId, wearable); m_scene.CommsManager.UserService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance); + m_controllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); } // Because appearance setting is in a module, we actually need -- cgit v1.1