diff options
author | Adam Frisby | 2009-08-21 14:20:05 +1000 |
---|---|---|
committer | Adam Frisby | 2009-08-21 14:20:05 +1000 |
commit | 98da8e9b16de75aba2a5af175e7ca8c528fa418c (patch) | |
tree | fd9178d0ae0791d3ccca81b1ab69249b31ea69a8 /OpenSim/Region/OptionalModules/World | |
parent | * Implements a cache in NPCModule for Appearance. (diff) | |
download | opensim-SC_OLD-98da8e9b16de75aba2a5af175e7ca8c528fa418c.zip opensim-SC_OLD-98da8e9b16de75aba2a5af175e7ca8c528fa418c.tar.gz opensim-SC_OLD-98da8e9b16de75aba2a5af175e7ca8c528fa418c.tar.bz2 opensim-SC_OLD-98da8e9b16de75aba2a5af175e7ca8c528fa418c.tar.xz |
* Make cache, actually cache.
Diffstat (limited to 'OpenSim/Region/OptionalModules/World')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index d6b90e1..eeb74d9 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -48,7 +48,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
48 | if (m_appearanceCache.ContainsKey(target)) | 48 | if (m_appearanceCache.ContainsKey(target)) |
49 | return m_appearanceCache[target]; | 49 | return m_appearanceCache[target]; |
50 | 50 | ||
51 | return scene.CommsManager.AvatarService.GetUserAppearance(target); | 51 | AvatarAppearance x = scene.CommsManager.AvatarService.GetUserAppearance(target); |
52 | |||
53 | m_appearanceCache.Add(target, x); | ||
54 | |||
55 | return x; | ||
52 | } | 56 | } |
53 | 57 | ||
54 | public UUID CreateNPC(string firstname, string lastname,Vector3 position, Scene scene, UUID cloneAppearanceFrom) | 58 | public UUID CreateNPC(string firstname, string lastname,Vector3 position, Scene scene, UUID cloneAppearanceFrom) |