diff options
author | UbitUmarov | 2017-01-19 18:25:25 +0000 |
---|---|---|
committer | UbitUmarov | 2017-01-19 18:25:25 +0000 |
commit | 6826ca9b57e8582722efe3f9626148b2e52ef160 (patch) | |
tree | 05769c1887c66ec1b661e6106d6a96a3b1a5c41b /OpenSim/Region | |
parent | change CanDeedObject. WARNING like on other grids, if you do not set next own... (diff) | |
download | opensim-SC-6826ca9b57e8582722efe3f9626148b2e52ef160.zip opensim-SC-6826ca9b57e8582722efe3f9626148b2e52ef160.tar.gz opensim-SC-6826ca9b57e8582722efe3f9626148b2e52ef160.tar.bz2 opensim-SC-6826ca9b57e8582722efe3f9626148b2e52ef160.tar.xz |
fix the meaning of objectDuplicate[OnRay]() flags parameter but still not using it
Diffstat (limited to 'OpenSim/Region')
5 files changed, 13 insertions, 9 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 7455dea..410ac00 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -7758,10 +7758,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7758 | 7758 | ||
7759 | ObjectDuplicate handlerObjectDuplicate = null; | 7759 | ObjectDuplicate handlerObjectDuplicate = null; |
7760 | 7760 | ||
7761 | for (int i = 0; i < dupe.ObjectData.Length; i++) | 7761 | handlerObjectDuplicate = OnObjectDuplicate; |
7762 | if (handlerObjectDuplicate != null) | ||
7762 | { | 7763 | { |
7763 | handlerObjectDuplicate = OnObjectDuplicate; | 7764 | for (int i = 0; i < dupe.ObjectData.Length; i++) |
7764 | if (handlerObjectDuplicate != null) | ||
7765 | { | 7765 | { |
7766 | UUID rezGroupID = dupe.AgentData.GroupID; | 7766 | UUID rezGroupID = dupe.AgentData.GroupID; |
7767 | if(!IsGroupMember(rezGroupID)) | 7767 | if(!IsGroupMember(rezGroupID)) |
diff --git a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs index 0d8ece7..a349aa1 100644 --- a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs +++ b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs | |||
@@ -151,7 +151,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests | |||
151 | 151 | ||
152 | SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01); | 152 | SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01); |
153 | m_scene.AddNewSceneObject(sog, false); | 153 | m_scene.AddNewSceneObject(sog, false); |
154 | m_scene.SceneGraph.DuplicateObject(sog.LocalId, Vector3.Zero, 0, m_userId, UUID.Zero, Quaternion.Identity); | 154 | m_scene.SceneGraph.DuplicateObject(sog.LocalId, Vector3.Zero, m_userId, UUID.Zero, Quaternion.Identity, false); |
155 | 155 | ||
156 | Assert.That(pc.Owner, Is.EqualTo(6)); | 156 | Assert.That(pc.Owner, Is.EqualTo(6)); |
157 | Assert.That(pc.Group, Is.EqualTo(0)); | 157 | Assert.That(pc.Group, Is.EqualTo(0)); |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index ff1e34e..d9b0327 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3605,7 +3605,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3605 | /// <param name="GroupID">Group of new object</param> | 3605 | /// <param name="GroupID">Group of new object</param> |
3606 | public void DuplicateObject(uint originalPrim, Vector3 offset, uint flags, UUID AgentID, UUID GroupID) | 3606 | public void DuplicateObject(uint originalPrim, Vector3 offset, uint flags, UUID AgentID, UUID GroupID) |
3607 | { | 3607 | { |
3608 | SceneObjectGroup copy = SceneGraph.DuplicateObject(originalPrim, offset, flags, AgentID, GroupID, Quaternion.Identity); | 3608 | bool createSelected = (flags & (uint)PrimFlags.CreateSelected) != 0; |
3609 | SceneObjectGroup copy = SceneGraph.DuplicateObject(originalPrim, offset, AgentID, | ||
3610 | GroupID, Quaternion.Identity, createSelected); | ||
3609 | if (copy != null) | 3611 | if (copy != null) |
3610 | EventManager.TriggerObjectAddedToScene(copy); | 3612 | EventManager.TriggerObjectAddedToScene(copy); |
3611 | } | 3613 | } |
@@ -3635,6 +3637,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3635 | SceneObjectPart target = GetSceneObjectPart(localID); | 3637 | SceneObjectPart target = GetSceneObjectPart(localID); |
3636 | SceneObjectPart target2 = GetSceneObjectPart(RayTargetObj); | 3638 | SceneObjectPart target2 = GetSceneObjectPart(RayTargetObj); |
3637 | 3639 | ||
3640 | bool createSelected = (dupeFlags & (uint)PrimFlags.CreateSelected) != 0; | ||
3641 | |||
3638 | if (target != null && target2 != null) | 3642 | if (target != null && target2 != null) |
3639 | { | 3643 | { |
3640 | Vector3 direction = Vector3.Normalize(RayEnd - RayStart); | 3644 | Vector3 direction = Vector3.Normalize(RayEnd - RayStart); |
@@ -3676,13 +3680,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
3676 | Quaternion worldRot = target2.GetWorldRotation(); | 3680 | Quaternion worldRot = target2.GetWorldRotation(); |
3677 | 3681 | ||
3678 | // SceneObjectGroup obj = m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot); | 3682 | // SceneObjectGroup obj = m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot); |
3679 | copy = m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot); | 3683 | copy = m_sceneGraph.DuplicateObject(localID, pos, AgentID, GroupID, worldRot, createSelected); |
3680 | //obj.Rotation = worldRot; | 3684 | //obj.Rotation = worldRot; |
3681 | //obj.UpdateGroupRotationR(worldRot); | 3685 | //obj.UpdateGroupRotationR(worldRot); |
3682 | } | 3686 | } |
3683 | else | 3687 | else |
3684 | { | 3688 | { |
3685 | copy = m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, Quaternion.Identity); | 3689 | copy = m_sceneGraph.DuplicateObject(localID, pos, AgentID, GroupID, Quaternion.Identity, createSelected); |
3686 | } | 3690 | } |
3687 | 3691 | ||
3688 | if (copy != null) | 3692 | if (copy != null) |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 6a36982..ebf081e 100755 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -2057,7 +2057,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2057 | /// <param name="rot"></param> | 2057 | /// <param name="rot"></param> |
2058 | /// <returns>null if duplication fails, otherwise the duplicated object</returns> | 2058 | /// <returns>null if duplication fails, otherwise the duplicated object</returns> |
2059 | /// <summary> | 2059 | /// <summary> |
2060 | public SceneObjectGroup DuplicateObject(uint originalPrimID, Vector3 offset, uint flags, UUID AgentID, UUID GroupID, Quaternion rot) | 2060 | public SceneObjectGroup DuplicateObject(uint originalPrimID, Vector3 offset, UUID AgentID, UUID GroupID, Quaternion rot, bool createSelected) |
2061 | { | 2061 | { |
2062 | // m_log.DebugFormat( | 2062 | // m_log.DebugFormat( |
2063 | // "[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", | 2063 | // "[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs index 56723bf..4d2eb3f 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs | |||
@@ -67,7 +67,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
67 | 67 | ||
68 | SceneObjectGroup dupeSo | 68 | SceneObjectGroup dupeSo |
69 | = scene.SceneGraph.DuplicateObject( | 69 | = scene.SceneGraph.DuplicateObject( |
70 | part1.LocalId, new Vector3(10, 0, 0), 0, ownerId, UUID.Zero, Quaternion.Identity); | 70 | part1.LocalId, new Vector3(10, 0, 0), ownerId, UUID.Zero, Quaternion.Identity, false); |
71 | Assert.That(dupeSo.Parts.Length, Is.EqualTo(2)); | 71 | Assert.That(dupeSo.Parts.Length, Is.EqualTo(2)); |
72 | 72 | ||
73 | SceneObjectPart dupePart1 = dupeSo.GetLinkNumPart(1); | 73 | SceneObjectPart dupePart1 = dupeSo.GetLinkNumPart(1); |