aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authordiva2009-03-27 20:18:55 +0000
committerdiva2009-03-27 20:18:55 +0000
commitbce5ed5812cc4385852a324da8a478086a7a0d37 (patch)
tree4f7d83e404137e236bd61b021f392eeb34632f3b /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parent* minor: remove one mono compiler warning (diff)
downloadopensim-SC_OLD-bce5ed5812cc4385852a324da8a478086a7a0d37.zip
opensim-SC_OLD-bce5ed5812cc4385852a324da8a478086a7a0d37.tar.gz
opensim-SC_OLD-bce5ed5812cc4385852a324da8a478086a7a0d37.tar.bz2
opensim-SC_OLD-bce5ed5812cc4385852a324da8a478086a7a0d37.tar.xz
Moved a method GetDefaultVisualParameters from Scene to AvatarAppearance, where it belongs. Better error handling in ScenePresence.CopyFrom.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs7
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)