Removed "hacktastic" code that is no longer needed.

We no longer set the object's AbsolutePosition in this place, so the IsAttachment hack doesn't do anything anymore.

This resolves http://opensimulator.org/mantis/view.php?id=6936
0.8.0.3
Oren Hurvitz 2013-10-24 12:21:20 +03:00
parent 62b3bdf0fc
commit 773ffcafc3
1 changed files with 0 additions and 21 deletions

View File

@ -1701,28 +1701,7 @@ namespace OpenSim.Region.Framework.Scenes
SceneObjectGroup dupe = (SceneObjectGroup)MemberwiseClone(); SceneObjectGroup dupe = (SceneObjectGroup)MemberwiseClone();
dupe.Backup = false; dupe.Backup = false;
dupe.m_parts = new MapAndArray<OpenMetaverse.UUID, SceneObjectPart>(); dupe.m_parts = new MapAndArray<OpenMetaverse.UUID, SceneObjectPart>();
// Warning, The following code related to previousAttachmentStatus is needed so that clones of
// attachments do not bordercross while they're being duplicated. This is hacktastic!
// Normally, setting AbsolutePosition will bordercross a prim if it's outside the region!
// unless IsAttachment is true!, so to prevent border crossing, we save it's attachment state
// (which should be false anyway) set it as an Attachment and then set it's Absolute Position,
// then restore it's attachment state
// This is only necessary when userExposed is false!
bool previousAttachmentStatus = dupe.IsAttachment;
if (!userExposed)
dupe.IsAttachment = true;
dupe.m_sittingAvatars = new List<UUID>(); dupe.m_sittingAvatars = new List<UUID>();
if (!userExposed)
{
dupe.IsAttachment = previousAttachmentStatus;
}
dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed);
dupe.m_rootPart.LinkNum = m_rootPart.LinkNum; dupe.m_rootPart.LinkNum = m_rootPart.LinkNum;