diff options
author | Mic Bowman | 2010-11-29 16:24:16 -0800 |
---|---|---|
committer | Melanie | 2010-11-30 16:20:43 +0100 |
commit | ab2adaf3418e5a64c7d94305d45489310eaa2ab0 (patch) | |
tree | 7f80d7795fdc6c4dfb0911ed87af8d8d0131b275 /OpenSim/Region/Framework/Scenes/ScenePresence.cs | |
parent | Prevent the restart module from barfing if it's not configured (diff) | |
download | opensim-SC_OLD-ab2adaf3418e5a64c7d94305d45489310eaa2ab0.zip opensim-SC_OLD-ab2adaf3418e5a64c7d94305d45489310eaa2ab0.tar.gz opensim-SC_OLD-ab2adaf3418e5a64c7d94305d45489310eaa2ab0.tar.bz2 opensim-SC_OLD-ab2adaf3418e5a64c7d94305d45489310eaa2ab0.tar.xz |
Various bug fixes for appearance handling
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 46 |
1 files changed, 30 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 24c809b..5a842d8 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2773,30 +2773,44 @@ namespace OpenSim.Region.Framework.Scenes | |||
2773 | // the inventory arrives | 2773 | // the inventory arrives |
2774 | // m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance); | 2774 | // m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance); |
2775 | 2775 | ||
2776 | // This agent just became root. We are going to tell everyone about it. The process of | 2776 | bool cachedappearance = false; |
2777 | // getting other avatars information was initiated in the constructor... don't do it | ||
2778 | // again here... | ||
2779 | SendAvatarDataToAllAgents(); | ||
2780 | 2777 | ||
2781 | // We have an appearance but we may not have the baked textures. Check the asset cache | 2778 | // We have an appearance but we may not have the baked textures. Check the asset cache |
2782 | // to see if all the baked textures are already here. | 2779 | // to see if all the baked textures are already here. |
2783 | if (m_scene.AvatarFactory != null) | 2780 | if (m_scene.AvatarFactory != null) |
2784 | { | 2781 | { |
2785 | if (m_scene.AvatarFactory.ValidateBakedTextureCache(m_controllingClient)) | 2782 | cachedappearance = m_scene.AvatarFactory.ValidateBakedTextureCache(m_controllingClient); |
2786 | { | ||
2787 | // m_log.WarnFormat("[SCENEPRESENCE]: baked textures are in the cache for {0}", Name); | ||
2788 | SendAppearanceToAgent(this); | ||
2789 | |||
2790 | // If the avatars baked textures are all in the cache, then we have a | ||
2791 | // complete appearance... send it out, if not, then we'll send it when | ||
2792 | // the avatar finishes updating its appearance | ||
2793 | SendAppearanceToAllOtherAgents(); | ||
2794 | } | ||
2795 | } | 2783 | } |
2796 | else | 2784 | else |
2797 | { | 2785 | { |
2798 | m_log.WarnFormat("[SCENEPRESENCE]: AvatarFactory not set for {0}", Name); | 2786 | m_log.WarnFormat("[SCENEPRESENCE]: AvatarFactory not set for {0}", Name); |
2799 | } | 2787 | } |
2788 | |||
2789 | // If we aren't using a cached appearance, then clear out the baked textures | ||
2790 | if (! cachedappearance) | ||
2791 | { | ||
2792 | m_appearance.ResetBakedTextures(); | ||
2793 | if (m_scene.AvatarFactory != null) | ||
2794 | m_scene.AvatarFactory.QueueAppearanceSave(UUID); | ||
2795 | } | ||
2796 | |||
2797 | // This agent just became root. We are going to tell everyone about it. The process of | ||
2798 | // getting other avatars information was initiated in the constructor... don't do it | ||
2799 | // again here... this comes after the cached appearance check because the avatars | ||
2800 | // appearance goes into the avatar update packet | ||
2801 | SendAvatarDataToAllAgents(); | ||
2802 | |||
2803 | // If we are using the the cached appearance then send it out to everyone | ||
2804 | if (cachedappearance) | ||
2805 | { | ||
2806 | m_log.WarnFormat("[SCENEPRESENCE]: baked textures are in the cache for {0}", Name); | ||
2807 | SendAppearanceToAgent(this); | ||
2808 | |||
2809 | // If the avatars baked textures are all in the cache, then we have a | ||
2810 | // complete appearance... send it out, if not, then we'll send it when | ||
2811 | // the avatar finishes updating its appearance | ||
2812 | SendAppearanceToAllOtherAgents(); | ||
2813 | } | ||
2800 | } | 2814 | } |
2801 | 2815 | ||
2802 | /// <summary> | 2816 | /// <summary> |
@@ -2856,7 +2870,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2856 | /// Send avatar data to an agent. | 2870 | /// Send avatar data to an agent. |
2857 | /// </summary> | 2871 | /// </summary> |
2858 | /// <param name="avatar"></param> | 2872 | /// <param name="avatar"></param> |
2859 | private void SendAvatarDataToAgent(ScenePresence avatar) | 2873 | public void SendAvatarDataToAgent(ScenePresence avatar) |
2860 | { | 2874 | { |
2861 | // m_log.WarnFormat("[SP] Send avatar data from {0} to {1}",m_uuid,avatar.ControllingClient.AgentId); | 2875 | // m_log.WarnFormat("[SP] Send avatar data from {0} to {1}",m_uuid,avatar.ControllingClient.AgentId); |
2862 | 2876 | ||
@@ -2924,7 +2938,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2924 | /// Send appearance data to an agent. | 2938 | /// Send appearance data to an agent. |
2925 | /// </summary> | 2939 | /// </summary> |
2926 | /// <param name="avatar"></param> | 2940 | /// <param name="avatar"></param> |
2927 | private void SendAppearanceToAgent(ScenePresence avatar) | 2941 | public void SendAppearanceToAgent(ScenePresence avatar) |
2928 | { | 2942 | { |
2929 | // m_log.WarnFormat("[SP] Send appearance from {0} to {1}",m_uuid,avatar.ControllingClient.AgentId); | 2943 | // m_log.WarnFormat("[SP] Send appearance from {0} to {1}",m_uuid,avatar.ControllingClient.AgentId); |
2930 | 2944 | ||