diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs | 48 |
2 files changed, 21 insertions, 30 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index f8f96a0..28507cd 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -1509,8 +1509,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1509 | public void SetAppearance(byte[] texture, List<byte> visualParam) | 1509 | public void SetAppearance(byte[] texture, List<byte> visualParam) |
1510 | { | 1510 | { |
1511 | m_appearance.SetAppearance(texture, visualParam); | 1511 | m_appearance.SetAppearance(texture, visualParam); |
1512 | m_scene.CommsManager.UserService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance); | ||
1513 | SetHeight(m_appearance.AvatarHeight); | 1512 | SetHeight(m_appearance.AvatarHeight); |
1513 | m_scene.CommsManager.UserService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance); | ||
1514 | 1514 | ||
1515 | SendAppearanceToAllOtherAgents(); | 1515 | SendAppearanceToAllOtherAgents(); |
1516 | } | 1516 | } |
@@ -1518,6 +1518,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1518 | public void SetWearable(int wearableId, AvatarWearable wearable) | 1518 | public void SetWearable(int wearableId, AvatarWearable wearable) |
1519 | { | 1519 | { |
1520 | m_appearance.SetWearable(wearableId, wearable); | 1520 | m_appearance.SetWearable(wearableId, wearable); |
1521 | m_scene.CommsManager.UserService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance); | ||
1521 | } | 1522 | } |
1522 | 1523 | ||
1523 | /// <summary> | 1524 | /// <summary> |
diff --git a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs index a1abe8b..4c933d6 100644 --- a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -274,47 +274,37 @@ namespace OpenSim.Region.Modules.AvatarFactory | |||
274 | { | 274 | { |
275 | IClientAPI clientView = (IClientAPI)sender; | 275 | IClientAPI clientView = (IClientAPI)sender; |
276 | CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(clientView.AgentId); | 276 | CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(clientView.AgentId); |
277 | AvatarAppearance avatAppearance = m_scene.CommsManager.UserService.GetUserAppearance(clientView.AgentId); | ||
277 | if (profile != null) | 278 | if (profile != null) |
278 | { | 279 | { |
279 | if (profile.RootFolder != null) | 280 | if (profile.RootFolder != null) |
280 | { | 281 | { |
281 | if (m_avatarsAppearance.ContainsKey(clientView.AgentId)) | 282 | |
283 | foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) | ||
282 | { | 284 | { |
283 | AvatarAppearance avatAppearance = null; | 285 | if (wear.Type < 13) |
284 | lock (m_avatarsAppearance) | ||
285 | { | 286 | { |
286 | avatAppearance = m_avatarsAppearance[clientView.AgentId]; | 287 | if (wear.ItemID == LLUUID.Zero) |
287 | } | ||
288 | |||
289 | foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) | ||
290 | { | ||
291 | if (wear.Type < 13) | ||
292 | { | 288 | { |
293 | if (wear.ItemID == LLUUID.Zero) | 289 | avatAppearance.Wearables[wear.Type].ItemID = LLUUID.Zero; |
294 | { | 290 | avatAppearance.Wearables[wear.Type].AssetID = LLUUID.Zero; |
295 | avatAppearance.Wearables[wear.Type].ItemID = LLUUID.Zero; | 291 | } |
296 | avatAppearance.Wearables[wear.Type].AssetID = LLUUID.Zero; | 292 | else |
297 | 293 | { | |
298 | UpdateDatabase(clientView.AgentId, avatAppearance); | 294 | LLUUID assetId; |
299 | } | 295 | |
300 | else | 296 | InventoryItemBase baseItem = profile.RootFolder.FindItem(wear.ItemID); |
297 | |||
298 | if (baseItem != null) | ||
301 | { | 299 | { |
302 | LLUUID assetId; | 300 | assetId = baseItem.AssetID; |
303 | 301 | avatAppearance.Wearables[wear.Type].AssetID = assetId; | |
304 | InventoryItemBase baseItem = profile.RootFolder.FindItem(wear.ItemID); | 302 | avatAppearance.Wearables[wear.Type].ItemID = wear.ItemID; |
305 | |||
306 | if (baseItem != null) | ||
307 | { | ||
308 | assetId = baseItem.AssetID; | ||
309 | avatAppearance.Wearables[wear.Type].AssetID = assetId; | ||
310 | avatAppearance.Wearables[wear.Type].ItemID = wear.ItemID; | ||
311 | |||
312 | UpdateDatabase(clientView.AgentId, avatAppearance); | ||
313 | } | ||
314 | } | 303 | } |
315 | } | 304 | } |
316 | } | 305 | } |
317 | } | 306 | } |
307 | m_scene.CommsManager.UserService.UpdateUserAppearance(clientView.AgentId, avatAppearance); | ||
318 | } | 308 | } |
319 | } | 309 | } |
320 | } | 310 | } |