diff options
author | diva | 2009-02-17 23:46:19 +0000 |
---|---|---|
committer | diva | 2009-02-17 23:46:19 +0000 |
commit | c381bee515de5a4cc4608f4eef308505a40fd7e4 (patch) | |
tree | c22b9be8f652c8894e54d659ad7eeb183771d30e /OpenSim | |
parent | Fix a typo. i + i is not 2 times me (diff) | |
download | opensim-SC-c381bee515de5a4cc4608f4eef308505a40fd7e4.zip opensim-SC-c381bee515de5a4cc4608f4eef308505a40fd7e4.tar.gz opensim-SC-c381bee515de5a4cc4608f4eef308505a40fd7e4.tar.bz2 opensim-SC-c381bee515de5a4cc4608f4eef308505a40fd7e4.tar.xz |
Makes SP.CopyFrom a bit more robust with respect to sims in older versions which still don't have the new appearance management code.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index a488f59..fed541f 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2678,10 +2678,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2678 | m_setAlwaysRun = cAgent.AlwaysRun; | 2678 | m_setAlwaysRun = cAgent.AlwaysRun; |
2679 | 2679 | ||
2680 | uint i = 0; | 2680 | uint i = 0; |
2681 | AvatarWearable[] wearables = new AvatarWearable[cAgent.AgentTextures.Length / 2]; | ||
2682 | Primitive.TextureEntry te = new Primitive.TextureEntry(UUID.Random()); | ||
2683 | try | 2681 | try |
2684 | { | 2682 | { |
2683 | AvatarWearable[] wearables = new AvatarWearable[cAgent.AgentTextures.Length / 2]; | ||
2684 | Primitive.TextureEntry te = new Primitive.TextureEntry(UUID.Random()); | ||
2685 | for (uint n = 0; n < cAgent.AgentTextures.Length; n += 2) | 2685 | for (uint n = 0; n < cAgent.AgentTextures.Length; n += 2) |
2686 | { | 2686 | { |
2687 | UUID itemId = cAgent.AgentTextures[n]; | 2687 | UUID itemId = cAgent.AgentTextures[n]; |
@@ -2689,15 +2689,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
2689 | wearables[i] = new AvatarWearable(itemId, assetId); | 2689 | wearables[i] = new AvatarWearable(itemId, assetId); |
2690 | te.CreateFace(i++).TextureID = assetId; | 2690 | te.CreateFace(i++).TextureID = assetId; |
2691 | } | 2691 | } |
2692 | m_appearance.Wearables = wearables; | ||
2693 | m_appearance.SetAppearance(te.ToBytes(), new List<byte>(cAgent.VisualParams)); | ||
2692 | } | 2694 | } |
2693 | catch (Exception e) | 2695 | catch (Exception e) |
2694 | { | 2696 | { |
2695 | m_log.Warn("[SCENE PRESENCE]: exception in CopyFrom " + e.Message); | 2697 | m_log.Warn("[SCENE PRESENCE]: exception in CopyFrom " + e.Message); |
2696 | } | 2698 | } |
2697 | //m_appearance.Texture = te; | ||
2698 | m_appearance.Wearables = wearables; | ||
2699 | //m_appearance.VisualParams = cAgent.VisualParams; | ||
2700 | m_appearance.SetAppearance(te.ToBytes(), new List<byte>(cAgent.VisualParams)); | ||
2701 | 2699 | ||
2702 | //cAgent.GroupID = ?? | 2700 | //cAgent.GroupID = ?? |
2703 | //Groups??? | 2701 | //Groups??? |