diff options
author | Melanie Thielker | 2010-06-28 01:29:30 +0200 |
---|---|---|
committer | Melanie | 2010-06-28 01:36:40 +0100 |
commit | 4cdda2cae9f91ac793bfaf192e94cbe4607c3886 (patch) | |
tree | de2de53cb30faf2e11f5820c2edfdd647c7121d5 | |
parent | Fix a simian compiler warning (diff) | |
download | opensim-SC-4cdda2cae9f91ac793bfaf192e94cbe4607c3886.zip opensim-SC-4cdda2cae9f91ac793bfaf192e94cbe4607c3886.tar.gz opensim-SC-4cdda2cae9f91ac793bfaf192e94cbe4607c3886.tar.bz2 opensim-SC-4cdda2cae9f91ac793bfaf192e94cbe4607c3886.tar.xz |
Fix Copy on Ray, Drag Copy and other little things. Removed the wrong and
nonworking ownership assignment in SOG, which messed things up before.
No longer trust the client to send the ID of the person something is copied
as, since it allows to run a script with someone else's permissions. Properly
adjust inventory ownership and perms.
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 18 |
3 files changed, 6 insertions, 20 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index cdd22de..d2824bd 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -6303,8 +6303,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6303 | if (handlerObjectDuplicate != null) | 6303 | if (handlerObjectDuplicate != null) |
6304 | { | 6304 | { |
6305 | handlerObjectDuplicate(dupe.ObjectData[i].ObjectLocalID, dupe.SharedData.Offset, | 6305 | handlerObjectDuplicate(dupe.ObjectData[i].ObjectLocalID, dupe.SharedData.Offset, |
6306 | dupe.SharedData.DuplicateFlags, AgentandGroupData.AgentID, | 6306 | dupe.SharedData.DuplicateFlags, AgentId, |
6307 | AgentandGroupData.GroupID); | 6307 | m_activeGroupID); |
6308 | } | 6308 | } |
6309 | } | 6309 | } |
6310 | 6310 | ||
@@ -6894,7 +6894,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6894 | if (handlerObjectDuplicateOnRay != null) | 6894 | if (handlerObjectDuplicateOnRay != null) |
6895 | { | 6895 | { |
6896 | handlerObjectDuplicateOnRay(dupeOnRay.ObjectData[i].ObjectLocalID, dupeOnRay.AgentData.DuplicateFlags, | 6896 | handlerObjectDuplicateOnRay(dupeOnRay.ObjectData[i].ObjectLocalID, dupeOnRay.AgentData.DuplicateFlags, |
6897 | dupeOnRay.AgentData.AgentID, dupeOnRay.AgentData.GroupID, dupeOnRay.AgentData.RayTargetID, dupeOnRay.AgentData.RayEnd, | 6897 | AgentId, m_activeGroupID, dupeOnRay.AgentData.RayTargetID, dupeOnRay.AgentData.RayEnd, |
6898 | dupeOnRay.AgentData.RayStart, dupeOnRay.AgentData.BypassRaycast, dupeOnRay.AgentData.RayEndIsIntersection, | 6898 | dupeOnRay.AgentData.RayStart, dupeOnRay.AgentData.BypassRaycast, dupeOnRay.AgentData.RayEndIsIntersection, |
6899 | dupeOnRay.AgentData.CopyCenters, dupeOnRay.AgentData.CopyRotates); | 6899 | dupeOnRay.AgentData.CopyCenters, dupeOnRay.AgentData.CopyRotates); |
6900 | } | 6900 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index ebb3005..5fea332 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -1750,7 +1750,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1750 | SceneObjectGroup copy = original.Copy(AgentID, GroupID, true); | 1750 | SceneObjectGroup copy = original.Copy(AgentID, GroupID, true); |
1751 | copy.AbsolutePosition = copy.AbsolutePosition + offset; | 1751 | copy.AbsolutePosition = copy.AbsolutePosition + offset; |
1752 | 1752 | ||
1753 | if (copy.OwnerID != AgentID) | 1753 | if (original.OwnerID != AgentID) |
1754 | { | 1754 | { |
1755 | copy.SetOwnerId(AgentID); | 1755 | copy.SetOwnerId(AgentID); |
1756 | copy.SetRootPartOwner(copy.RootPart, AgentID, GroupID); | 1756 | copy.SetRootPartOwner(copy.RootPart, AgentID, GroupID); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index e23f39f..fad470f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1551,7 +1551,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1551 | dupe.AbsolutePosition = new Vector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z); | 1551 | dupe.AbsolutePosition = new Vector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z); |
1552 | 1552 | ||
1553 | if (!userExposed) | 1553 | if (!userExposed) |
1554 | { | ||
1554 | dupe.RootPart.IsAttachment = previousAttachmentStatus; | 1555 | dupe.RootPart.IsAttachment = previousAttachmentStatus; |
1556 | } | ||
1555 | 1557 | ||
1556 | dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); | 1558 | dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); |
1557 | dupe.m_rootPart.LinkNum = m_rootPart.LinkNum; | 1559 | dupe.m_rootPart.LinkNum = m_rootPart.LinkNum; |
@@ -1576,16 +1578,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1576 | dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true); | 1578 | dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true); |
1577 | } | 1579 | } |
1578 | 1580 | ||
1579 | // Now we've made a copy that replaces this one, we need to | ||
1580 | // switch the owner to the person who did the copying | ||
1581 | // Second Life copies an object and duplicates the first one in it's place | ||
1582 | // So, we have to make a copy of this one, set it in it's place then set the owner on this one | ||
1583 | if (userExposed) | ||
1584 | { | ||
1585 | SetRootPartOwner(m_rootPart, cAgentID, cGroupID); | ||
1586 | m_rootPart.ScheduleFullUpdate(); | ||
1587 | } | ||
1588 | |||
1589 | List<SceneObjectPart> partList; | 1581 | List<SceneObjectPart> partList; |
1590 | 1582 | ||
1591 | lock (m_parts) | 1583 | lock (m_parts) |
@@ -1606,12 +1598,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1606 | SceneObjectPart newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed); | 1598 | SceneObjectPart newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed); |
1607 | 1599 | ||
1608 | newPart.LinkNum = part.LinkNum; | 1600 | newPart.LinkNum = part.LinkNum; |
1609 | |||
1610 | if (userExposed) | ||
1611 | { | ||
1612 | SetPartOwner(newPart, cAgentID, cGroupID); | ||
1613 | newPart.ScheduleFullUpdate(); | ||
1614 | } | ||
1615 | } | 1601 | } |
1616 | } | 1602 | } |
1617 | 1603 | ||