diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index bb63bcd..0cadd83 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -211,6 +211,13 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
211 | // Process the visual params, this may change height as well | 211 | // Process the visual params, this may change height as well |
212 | if (visualParams != null) | 212 | if (visualParams != null) |
213 | { | 213 | { |
214 | // string[] visualParamsStrings = new string[visualParams.Length]; | ||
215 | // for (int i = 0; i < visualParams.Length; i++) | ||
216 | // visualParamsStrings[i] = visualParams[i].ToString(); | ||
217 | // m_log.DebugFormat( | ||
218 | // "[AVFACTORY]: Setting visual params for {0} to {1}", | ||
219 | // client.Name, string.Join(", ", visualParamsStrings)); | ||
220 | |||
214 | float oldHeight = sp.Appearance.AvatarHeight; | 221 | float oldHeight = sp.Appearance.AvatarHeight; |
215 | changed = sp.Appearance.SetVisualParams(visualParams); | 222 | changed = sp.Appearance.SetVisualParams(visualParams); |
216 | 223 | ||
@@ -418,6 +425,13 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
418 | 425 | ||
419 | // m_log.WarnFormat("[AVFACTORY] avatar {0} save appearance",agentid); | 426 | // m_log.WarnFormat("[AVFACTORY] avatar {0} save appearance",agentid); |
420 | 427 | ||
428 | // This could take awhile since it needs to pull inventory | ||
429 | // We need to do it at the point of save so that there is a sufficient delay for any upload of new body part/shape | ||
430 | // assets and item asset id changes to complete. | ||
431 | // I don't think we need to worry about doing this within m_setAppearanceLock since the queueing avoids | ||
432 | // multiple save requests. | ||
433 | SetAppearanceAssets(sp.UUID, sp.Appearance); | ||
434 | |||
421 | m_scene.AvatarService.SetAppearance(agentid, sp.Appearance); | 435 | m_scene.AvatarService.SetAppearance(agentid, sp.Appearance); |
422 | } | 436 | } |
423 | 437 | ||
@@ -504,9 +518,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
504 | 518 | ||
505 | avatAppearance.GetAssetsFrom(sp.Appearance); | 519 | avatAppearance.GetAssetsFrom(sp.Appearance); |
506 | 520 | ||
507 | // This could take awhile since it needs to pull inventory | ||
508 | SetAppearanceAssets(sp.UUID, ref avatAppearance); | ||
509 | |||
510 | lock (m_setAppearanceLock) | 521 | lock (m_setAppearanceLock) |
511 | { | 522 | { |
512 | // Update only those fields that we have changed. This is important because the viewer | 523 | // Update only those fields that we have changed. This is important because the viewer |
@@ -540,7 +551,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
540 | return true; | 551 | return true; |
541 | } | 552 | } |
542 | 553 | ||
543 | private void SetAppearanceAssets(UUID userID, ref AvatarAppearance appearance) | 554 | private void SetAppearanceAssets(UUID userID, AvatarAppearance appearance) |
544 | { | 555 | { |
545 | IInventoryService invService = m_scene.InventoryService; | 556 | IInventoryService invService = m_scene.InventoryService; |
546 | 557 | ||