From c31d93cb6f478062332c6a04fd1c357bb11205ee Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 1 May 2014 22:24:21 +0100 Subject: Fix issue where only one of multiple attachments on the same attachpoint for NPCs would be seen by other viewers. It appears that at least Singularity 1.8.5 (but probably others) rely on attachment FromItemIDs being different to display more than one. This commit resolves this by generating random IDs instead of always using UUID.Zero for NPCs. Resolves http://opensimulator.org/mantis/view.php?id=7110 --- OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'OpenSim/Region/CoreModules/Avatar') diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index c3846d9..e9b2f4f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -991,6 +991,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments return null; } + else if (itemID == UUID.Zero) + { + // We need to have a FromItemID for multiple attachments on a single attach point to appear. This is + // true on Singularity 1.8.5 and quite possibly other viewers as well. As NPCs don't have an inventory + // we will satisfy this requirement by inserting a random UUID. + objatt.FromItemID = UUID.Random(); + } if (DebugLevel > 0) m_log.DebugFormat( -- cgit v1.1