diff options
author | Melanie | 2010-10-21 17:09:42 +0100 |
---|---|---|
committer | Melanie | 2010-10-21 17:09:42 +0100 |
commit | 08e14d653e826b72300215dba8816abcc6a9e6ec (patch) | |
tree | 44aadaad5d7c3bde10b1ec6452e1e507d4df047e /OpenSim/Region/OptionalModules/World/NPC | |
parent | Make SImStatsReporter pick ObjectCapacity striaght out of region info (diff) | |
parent | Major refactoring of appearance handling. (diff) | |
download | opensim-SC-08e14d653e826b72300215dba8816abcc6a9e6ec.zip opensim-SC-08e14d653e826b72300215dba8816abcc6a9e6ec.tar.gz opensim-SC-08e14d653e826b72300215dba8816abcc6a9e6ec.tar.bz2 opensim-SC-08e14d653e826b72300215dba8816abcc6a9e6ec.tar.xz |
Merge branch 'dev-appearance' of git://github.com/cmickeyb/opensim into dev-appearance
Diffstat (limited to 'OpenSim/Region/OptionalModules/World/NPC')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index fae12b6..6928c4e 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -188,7 +188,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
188 | 188 | ||
189 | public event DeRezObject OnDeRezObject; | 189 | public event DeRezObject OnDeRezObject; |
190 | public event Action<IClientAPI> OnRegionHandShakeReply; | 190 | public event Action<IClientAPI> OnRegionHandShakeReply; |
191 | public event GenericCall2 OnRequestWearables; | 191 | public event GenericCall1 OnRequestWearables; |
192 | public event GenericCall1 OnCompleteMovementToRegion; | 192 | public event GenericCall1 OnCompleteMovementToRegion; |
193 | public event UpdateAgent OnPreAgentUpdate; | 193 | public event UpdateAgent OnPreAgentUpdate; |
194 | public event UpdateAgent OnAgentUpdate; | 194 | public event UpdateAgent OnAgentUpdate; |
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); |