diff options
author | Justin Clark-Casey (justincc) | 2013-03-19 21:44:18 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-03-19 21:49:29 +0000 |
commit | 364816421985c052521cf7b444e124760c0a1025 (patch) | |
tree | b6e51feda080bd3e131fabfc990e6533bb7cd83c /OpenSim/Region/CoreModules/Avatar | |
parent | For the moment, disable the output of the 'scene' statistics in SimExtraStats... (diff) | |
download | opensim-SC_OLD-364816421985c052521cf7b444e124760c0a1025.zip opensim-SC_OLD-364816421985c052521cf7b444e124760c0a1025.tar.gz opensim-SC_OLD-364816421985c052521cf7b444e124760c0a1025.tar.bz2 opensim-SC_OLD-364816421985c052521cf7b444e124760c0a1025.tar.xz |
Prevent multiple instances of the same item ID being appended to an AvatarAppearance
It looks like this was happening when AttachmentsModule.RezAttachments was doing a secondary set of each attachment to update with the asset ID (initially they only have the inventory ID).
However, with multi-attach this was appending a second copy of the same attachment rather than updating the data that was already there.
This commit requires both simulator and service to be updated.
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 12 |
2 files changed, 12 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 72ba3cf..ad17aa9 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -547,8 +547,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
547 | } | 547 | } |
548 | 548 | ||
549 | // m_log.DebugFormat( | 549 | // m_log.DebugFormat( |
550 | // "[ATTACHMENTS MODULE]: Detaching object {0} {1} for {2} in {3}", | 550 | // "[ATTACHMENTS MODULE]: Detaching object {0} {1} (FromItemID {2}) for {3} in {4}", |
551 | // so.Name, so.LocalId, sp.Name, m_scene.Name); | 551 | // so.Name, so.LocalId, so.FromItemID, sp.Name, m_scene.Name); |
552 | 552 | ||
553 | // Scripts MUST be snapshotted before the object is | 553 | // Scripts MUST be snapshotted before the object is |
554 | // removed from the scene because doing otherwise will | 554 | // removed from the scene because doing otherwise will |
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 00d1fd8..ff5bf9f 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -326,7 +326,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
326 | 326 | ||
327 | public void QueueAppearanceSave(UUID agentid) | 327 | public void QueueAppearanceSave(UUID agentid) |
328 | { | 328 | { |
329 | // m_log.WarnFormat("[AVFACTORY]: Queue appearance save for {0}", agentid); | 329 | // m_log.DebugFormat("[AVFACTORY]: Queueing appearance save for {0}", agentid); |
330 | 330 | ||
331 | // 10000 ticks per millisecond, 1000 milliseconds per second | 331 | // 10000 ticks per millisecond, 1000 milliseconds per second |
332 | long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_savetime * 1000 * 10000); | 332 | long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_savetime * 1000 * 10000); |
@@ -529,7 +529,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
529 | return; | 529 | return; |
530 | } | 530 | } |
531 | 531 | ||
532 | // m_log.WarnFormat("[AVFACTORY] avatar {0} save appearance",agentid); | 532 | // m_log.DebugFormat("[AVFACTORY]: Saving appearance for avatar {0}", agentid); |
533 | 533 | ||
534 | // This could take awhile since it needs to pull inventory | 534 | // This could take awhile since it needs to pull inventory |
535 | // 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 | 535 | // 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 |
@@ -538,6 +538,14 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
538 | // multiple save requests. | 538 | // multiple save requests. |
539 | SetAppearanceAssets(sp.UUID, sp.Appearance); | 539 | SetAppearanceAssets(sp.UUID, sp.Appearance); |
540 | 540 | ||
541 | // List<AvatarAttachment> attachments = sp.Appearance.GetAttachments(); | ||
542 | // foreach (AvatarAttachment att in attachments) | ||
543 | // { | ||
544 | // m_log.DebugFormat( | ||
545 | // "[AVFACTORY]: For {0} saving attachment {1} at point {2}", | ||
546 | // sp.Name, att.ItemID, att.AttachPoint); | ||
547 | // } | ||
548 | |||
541 | m_scene.AvatarService.SetAppearance(agentid, sp.Appearance); | 549 | m_scene.AvatarService.SetAppearance(agentid, sp.Appearance); |
542 | 550 | ||
543 | // Trigger this here because it's the final step in the set/queue/save process for appearance setting. | 551 | // Trigger this here because it's the final step in the set/queue/save process for appearance setting. |