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/Framework/Scenes | |
parent | change CanDeedObject. WARNING like on other grids, if you do not set next own... (diff) | |
download | opensim-SC_OLD-6826ca9b57e8582722efe3f9626148b2e52ef160.zip opensim-SC_OLD-6826ca9b57e8582722efe3f9626148b2e52ef160.tar.gz opensim-SC_OLD-6826ca9b57e8582722efe3f9626148b2e52ef160.tar.bz2 opensim-SC_OLD-6826ca9b57e8582722efe3f9626148b2e52ef160.tar.xz |
fix the meaning of objectDuplicate[OnRay]() flags parameter but still not using it
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rwxr-xr-x | OpenSim/Region/Framework/Scenes/Scene.cs | 10 | ||||
-rwxr-xr-x | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs | 2 |
3 files changed, 9 insertions, 5 deletions
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); |