From 6826ca9b57e8582722efe3f9626148b2e52ef160 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 19 Jan 2017 18:25:25 +0000 Subject: fix the meaning of objectDuplicate[OnRay]() flags parameter but still not using it --- OpenSim/Region/Framework/Scenes/Scene.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') 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 /// Group of new object public void DuplicateObject(uint originalPrim, Vector3 offset, uint flags, UUID AgentID, UUID GroupID) { - SceneObjectGroup copy = SceneGraph.DuplicateObject(originalPrim, offset, flags, AgentID, GroupID, Quaternion.Identity); + bool createSelected = (flags & (uint)PrimFlags.CreateSelected) != 0; + SceneObjectGroup copy = SceneGraph.DuplicateObject(originalPrim, offset, AgentID, + GroupID, Quaternion.Identity, createSelected); if (copy != null) EventManager.TriggerObjectAddedToScene(copy); } @@ -3635,6 +3637,8 @@ namespace OpenSim.Region.Framework.Scenes SceneObjectPart target = GetSceneObjectPart(localID); SceneObjectPart target2 = GetSceneObjectPart(RayTargetObj); + bool createSelected = (dupeFlags & (uint)PrimFlags.CreateSelected) != 0; + if (target != null && target2 != null) { Vector3 direction = Vector3.Normalize(RayEnd - RayStart); @@ -3676,13 +3680,13 @@ namespace OpenSim.Region.Framework.Scenes Quaternion worldRot = target2.GetWorldRotation(); // SceneObjectGroup obj = m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot); - copy = m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, worldRot); + copy = m_sceneGraph.DuplicateObject(localID, pos, AgentID, GroupID, worldRot, createSelected); //obj.Rotation = worldRot; //obj.UpdateGroupRotationR(worldRot); } else { - copy = m_sceneGraph.DuplicateObject(localID, pos, target.GetEffectiveObjectFlags(), AgentID, GroupID, Quaternion.Identity); + copy = m_sceneGraph.DuplicateObject(localID, pos, AgentID, GroupID, Quaternion.Identity, createSelected); } if (copy != null) -- cgit v1.1