fix the meaning of objectDuplicate[OnRay]() flags parameter but still not using it
parent
d8108ab740
commit
6826ca9b57
|
@ -7758,10 +7758,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
ObjectDuplicate handlerObjectDuplicate = null;
|
||||
|
||||
for (int i = 0; i < dupe.ObjectData.Length; i++)
|
||||
handlerObjectDuplicate = OnObjectDuplicate;
|
||||
if (handlerObjectDuplicate != null)
|
||||
{
|
||||
handlerObjectDuplicate = OnObjectDuplicate;
|
||||
if (handlerObjectDuplicate != null)
|
||||
for (int i = 0; i < dupe.ObjectData.Length; i++)
|
||||
{
|
||||
UUID rezGroupID = dupe.AgentData.GroupID;
|
||||
if(!IsGroupMember(rezGroupID))
|
||||
|
|
|
@ -151,7 +151,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
|
|||
|
||||
SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01);
|
||||
m_scene.AddNewSceneObject(sog, false);
|
||||
m_scene.SceneGraph.DuplicateObject(sog.LocalId, Vector3.Zero, 0, m_userId, UUID.Zero, Quaternion.Identity);
|
||||
m_scene.SceneGraph.DuplicateObject(sog.LocalId, Vector3.Zero, m_userId, UUID.Zero, Quaternion.Identity, false);
|
||||
|
||||
Assert.That(pc.Owner, Is.EqualTo(6));
|
||||
Assert.That(pc.Group, Is.EqualTo(0));
|
||||
|
|
|
@ -3605,7 +3605,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// <param name="GroupID">Group of new object</param>
|
||||
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)
|
||||
|
|
|
@ -2057,7 +2057,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// <param name="rot"></param>
|
||||
/// <returns>null if duplication fails, otherwise the duplicated object</returns>
|
||||
/// <summary>
|
||||
public SceneObjectGroup DuplicateObject(uint originalPrimID, Vector3 offset, uint flags, UUID AgentID, UUID GroupID, Quaternion rot)
|
||||
public SceneObjectGroup DuplicateObject(uint originalPrimID, Vector3 offset, UUID AgentID, UUID GroupID, Quaternion rot, bool createSelected)
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}",
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
|||
|
||||
SceneObjectGroup dupeSo
|
||||
= scene.SceneGraph.DuplicateObject(
|
||||
part1.LocalId, new Vector3(10, 0, 0), 0, ownerId, UUID.Zero, Quaternion.Identity);
|
||||
part1.LocalId, new Vector3(10, 0, 0), ownerId, UUID.Zero, Quaternion.Identity, false);
|
||||
Assert.That(dupeSo.Parts.Length, Is.EqualTo(2));
|
||||
|
||||
SceneObjectPart dupePart1 = dupeSo.GetLinkNumPart(1);
|
||||
|
|
Loading…
Reference in New Issue