mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
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
This commit is contained in:
@@ -1701,28 +1701,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
SceneObjectGroup dupe = (SceneObjectGroup)MemberwiseClone();
|
||||
dupe.Backup = false;
|
||||
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>();
|
||||
|
||||
if (!userExposed)
|
||||
{
|
||||
dupe.IsAttachment = previousAttachmentStatus;
|
||||
}
|
||||
|
||||
dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed);
|
||||
dupe.m_rootPart.LinkNum = m_rootPart.LinkNum;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user