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
This commit is contained in:
Justin Clark-Casey (justincc)
2014-05-01 22:24:21 +01:00
parent f0411dc128
commit c31d93cb6f
4 changed files with 74 additions and 7 deletions

View File

@@ -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(