Bug fix: Object Wear was doing Add not replace

0.9.1.0-post-fixes
UbitUmarov 2018-07-11 03:08:57 +01:00
parent c3933ce8b9
commit ee115a83df
1 changed files with 11 additions and 11 deletions

View File

@ -493,17 +493,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
return false;
}
List<SceneObjectGroup> attachments = sp.GetAttachments(attachmentPt);
if (attachments.Contains(group))
{
// if (DebugLevel > 0)
// m_log.WarnFormat(
// "[ATTACHMENTS MODULE]: Ignoring request to attach {0} {1} to {2} on {3} since it's already attached",
// group.Name, group.LocalId, sp.Name, attachmentPt);
return false;
}
Vector3 attachPos = group.AbsolutePosition;
// TODO: this short circuits multiple attachments functionality in LL viewer 2.1+ and should
@ -547,6 +536,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
attachPos = Vector3.Zero;
}
List<SceneObjectGroup> attachments = sp.GetAttachments(attachmentPt);
if (attachments.Contains(group))
{
// if (DebugLevel > 0)
// m_log.WarnFormat(
// "[ATTACHMENTS MODULE]: Ignoring request to attach {0} {1} to {2} on {3} since it's already attached",
// group.Name, group.LocalId, sp.Name, attachmentPt);
return false;
}
// If we already have 5, remove the oldest until only 4 are left. Skip over temp ones
while (attachments.Count >= 5)
{