From 98da8e9b16de75aba2a5af175e7ca8c528fa418c Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Fri, 21 Aug 2009 14:20:05 +1000 Subject: * Make cache, actually cache. --- OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'OpenSim') 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 if (m_appearanceCache.ContainsKey(target)) return m_appearanceCache[target]; - return scene.CommsManager.AvatarService.GetUserAppearance(target); + AvatarAppearance x = scene.CommsManager.AvatarService.GetUserAppearance(target); + + m_appearanceCache.Add(target, x); + + return x; } public UUID CreateNPC(string firstname, string lastname,Vector3 position, Scene scene, UUID cloneAppearanceFrom) -- cgit v1.1