aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
index ab0be77..c471636 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
@@ -64,15 +64,13 @@ namespace OpenSim.Region.OptionalModules.World.NPC
64 if (m_appearanceCache.ContainsKey(target)) 64 if (m_appearanceCache.ContainsKey(target))
65 return m_appearanceCache[target]; 65 return m_appearanceCache[target];
66 66
67 AvatarData adata = scene.AvatarService.GetAvatar(target); 67 AvatarAppearance appearance = scene.AvatarService.GetAppearance(target);
68 if (adata != null) 68 if (appearance != null)
69 { 69 {
70 AvatarAppearance x = adata.ToAvatarAppearance(target); 70 m_appearanceCache.Add(target, appearance);
71 71 return appearance;
72 m_appearanceCache.Add(target, x);
73
74 return x;
75 } 72 }
73
76 return new AvatarAppearance(); 74 return new AvatarAppearance();
77 } 75 }
78 76
@@ -169,7 +167,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC
169 { 167 {
170 AvatarAppearance x = GetAppearance(p_cloneAppearanceFrom, p_scene); 168 AvatarAppearance x = GetAppearance(p_cloneAppearanceFrom, p_scene);
171 169
172 sp.SetAppearance(x.Texture, (byte[])x.VisualParams.Clone()); 170 sp.Appearance.SetTextureEntries(x.Texture);
171 sp.Appearance.SetVisualParams((byte[])x.VisualParams.Clone());
172 sp.SendAppearanceToAllOtherAgents();
173 } 173 }
174 174
175 m_avatars.Add(npcAvatar.AgentId, npcAvatar); 175 m_avatars.Add(npcAvatar.AgentId, npcAvatar);