diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index a6d1ad3..c78aceb 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2849,6 +2849,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2849 | uint i = 0; | 2849 | uint i = 0; |
2850 | try | 2850 | try |
2851 | { | 2851 | { |
2852 | if (cAgent.Wearables == null) | ||
2853 | cAgent.Wearables = new UUID[0]; | ||
2852 | AvatarWearable[] wears = new AvatarWearable[cAgent.Wearables.Length / 2]; | 2854 | AvatarWearable[] wears = new AvatarWearable[cAgent.Wearables.Length / 2]; |
2853 | for (uint n = 0; n < cAgent.Wearables.Length; n += 2) | 2855 | for (uint n = 0; n < cAgent.Wearables.Length; n += 2) |
2854 | { | 2856 | { |
@@ -2857,12 +2859,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
2857 | wears[i++] = new AvatarWearable(itemId, assetId); | 2859 | wears[i++] = new AvatarWearable(itemId, assetId); |
2858 | } | 2860 | } |
2859 | m_appearance.Wearables = wears; | 2861 | m_appearance.Wearables = wears; |
2860 | |||
2861 | byte[] te = null; | 2862 | byte[] te = null; |
2862 | if (cAgent.AgentTextures != null) | 2863 | if (cAgent.AgentTextures != null) |
2863 | te = cAgent.AgentTextures; | 2864 | te = cAgent.AgentTextures; |
2864 | else | 2865 | else |
2865 | te = AvatarAppearance.GetDefaultTexture().ToBytes(); | 2866 | te = AvatarAppearance.GetDefaultTexture().ToBytes(); |
2867 | if ((cAgent.VisualParams == null) || (cAgent.VisualParams.Length < AvatarAppearance.VISUALPARAM_COUNT)) | ||
2868 | cAgent.VisualParams = AvatarAppearance.GetDefaultVisualParams(); | ||
2866 | m_appearance.SetAppearance(te, new List<byte>(cAgent.VisualParams)); | 2869 | m_appearance.SetAppearance(te, new List<byte>(cAgent.VisualParams)); |
2867 | } | 2870 | } |
2868 | catch (Exception e) | 2871 | catch (Exception e) |