diff options
author | Justin Clark-Casey (justincc) | 2011-09-23 22:36:20 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-09-23 22:36:20 +0100 |
commit | 8c4dd6b3302a142c6ac7578cc5012049c51610ed (patch) | |
tree | 75540bc841ed9588479c64d2cffd116130afd928 /OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |
parent | Use a copy of the inventory items list to register users in the thread starte... (diff) | |
parent | remove unused SOP.Create() method (diff) | |
download | opensim-SC_OLD-8c4dd6b3302a142c6ac7578cc5012049c51610ed.zip opensim-SC_OLD-8c4dd6b3302a142c6ac7578cc5012049c51610ed.tar.gz opensim-SC_OLD-8c4dd6b3302a142c6ac7578cc5012049c51610ed.tar.bz2 opensim-SC_OLD-8c4dd6b3302a142c6ac7578cc5012049c51610ed.tar.xz |
Merge branch 'master' into 0.7.2-post-fixes
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index b6a1564..0cadd83 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -211,8 +211,17 @@ 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 | |||
221 | float oldHeight = sp.Appearance.AvatarHeight; | ||
214 | changed = sp.Appearance.SetVisualParams(visualParams); | 222 | changed = sp.Appearance.SetVisualParams(visualParams); |
215 | if (sp.Appearance.AvatarHeight > 0) | 223 | |
224 | if (sp.Appearance.AvatarHeight != oldHeight && sp.Appearance.AvatarHeight > 0) | ||
216 | sp.SetHeight(sp.Appearance.AvatarHeight); | 225 | sp.SetHeight(sp.Appearance.AvatarHeight); |
217 | } | 226 | } |
218 | 227 | ||
@@ -416,6 +425,13 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
416 | 425 | ||
417 | // m_log.WarnFormat("[AVFACTORY] avatar {0} save appearance",agentid); | 426 | // m_log.WarnFormat("[AVFACTORY] avatar {0} save appearance",agentid); |
418 | 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 | |||
419 | m_scene.AvatarService.SetAppearance(agentid, sp.Appearance); | 435 | m_scene.AvatarService.SetAppearance(agentid, sp.Appearance); |
420 | } | 436 | } |
421 | 437 | ||
@@ -467,7 +483,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
467 | return; | 483 | return; |
468 | } | 484 | } |
469 | 485 | ||
470 | // m_log.WarnFormat("[AVFACTORY]: Received request for wearables of {0}", client.AgentId); | 486 | // m_log.DebugFormat("[AVFACTORY]: Received request for wearables of {0}", client.Name); |
471 | 487 | ||
472 | client.SendWearables(sp.Appearance.Wearables, sp.Appearance.Serial++); | 488 | client.SendWearables(sp.Appearance.Wearables, sp.Appearance.Serial++); |
473 | } | 489 | } |
@@ -502,9 +518,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
502 | 518 | ||
503 | avatAppearance.GetAssetsFrom(sp.Appearance); | 519 | avatAppearance.GetAssetsFrom(sp.Appearance); |
504 | 520 | ||
505 | // This could take awhile since it needs to pull inventory | ||
506 | SetAppearanceAssets(sp.UUID, ref avatAppearance); | ||
507 | |||
508 | lock (m_setAppearanceLock) | 521 | lock (m_setAppearanceLock) |
509 | { | 522 | { |
510 | // 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 |
@@ -538,7 +551,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
538 | return true; | 551 | return true; |
539 | } | 552 | } |
540 | 553 | ||
541 | private void SetAppearanceAssets(UUID userID, ref AvatarAppearance appearance) | 554 | private void SetAppearanceAssets(UUID userID, AvatarAppearance appearance) |
542 | { | 555 | { |
543 | IInventoryService invService = m_scene.InventoryService; | 556 | IInventoryService invService = m_scene.InventoryService; |
544 | 557 | ||