diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index ac39a53..a6d4a93 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -34,6 +34,7 @@ using OpenSim.Region.Framework.Scenes; | |||
34 | using OpenSim.Region.CoreModules.Avatar.NPC; | 34 | using OpenSim.Region.CoreModules.Avatar.NPC; |
35 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
36 | using Timer=System.Timers.Timer; | 36 | using Timer=System.Timers.Timer; |
37 | using OpenSim.Services.Interfaces; | ||
37 | 38 | ||
38 | namespace OpenSim.Region.OptionalModules.World.NPC | 39 | namespace OpenSim.Region.OptionalModules.World.NPC |
39 | { | 40 | { |
@@ -63,11 +64,16 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
63 | if (m_appearanceCache.ContainsKey(target)) | 64 | if (m_appearanceCache.ContainsKey(target)) |
64 | return m_appearanceCache[target]; | 65 | return m_appearanceCache[target]; |
65 | 66 | ||
66 | AvatarAppearance x = scene.CommsManager.AvatarService.GetUserAppearance(target); | 67 | AvatarData adata = scene.AvatarService.GetAvatar(target); |
68 | if (adata != null) | ||
69 | { | ||
70 | AvatarAppearance x = adata.ToAvatarAppearance(); | ||
67 | 71 | ||
68 | m_appearanceCache.Add(target, x); | 72 | m_appearanceCache.Add(target, x); |
69 | 73 | ||
70 | return x; | 74 | return x; |
75 | } | ||
76 | return new AvatarAppearance(); | ||
71 | } | 77 | } |
72 | 78 | ||
73 | public UUID CreateNPC(string firstname, string lastname,Vector3 position, Scene scene, UUID cloneAppearanceFrom) | 79 | public UUID CreateNPC(string firstname, string lastname,Vector3 position, Scene scene, UUID cloneAppearanceFrom) |