do not die tring to rez a item with a asset with uuid.Zero

This commit is contained in:
UbitUmarov
2020-09-20 22:19:27 +01:00
parent d256b29511
commit e4c7679e16
3 changed files with 23 additions and 24 deletions

View File

@@ -1241,7 +1241,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
return null;
}
if (itemID != UUID.Zero)
bool ItemIDNotZero = itemID != UUID.Zero;
if (ItemIDNotZero)
objatt = m_invAccessModule.RezObject(sp.ControllingClient,
itemID, rezGroupID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true,
false, false, sp.UUID, true);
@@ -1252,13 +1254,21 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
if (objatt == null)
{
m_log.WarnFormat(
"[ATTACHMENTS MODULE]: did not attached item {0} to avatar {1} at point {2}",
itemID, sp.Name, attachmentPt);
if(ItemIDNotZero)
{
m_log.WarnFormat("[ATTACHMENTS MODULE]: did not attach item {0} to avatar {1} at point {2}",
itemID, sp.Name, attachmentPt);
}
else
{
m_log.WarnFormat("[ATTACHMENTS MODULE]: did not attach item with asset {0} to avatar {1} at point {2}",
assetID, sp.Name, attachmentPt);
}
return null;
}
else if (itemID == UUID.Zero)
if (!ItemIDNotZero)
{
// 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