mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
* This completes ObjectDuplicateOnRay.
* In English, that means that Copy Selection works now, including Copy Centers and Copy Rotates.
This commit is contained in:
@@ -1399,7 +1399,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Duplicate the given object.
|
||||
/// Duplicate the given object, Fire and Forget, No rotation, no return wrapper
|
||||
/// </summary>
|
||||
/// <param name="originalPrim"></param>
|
||||
/// <param name="offset"></param>
|
||||
@@ -1408,6 +1408,18 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
//m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID);
|
||||
|
||||
SceneObjectGroup dupe = DuplicateObject(originalPrim, offset, flags, AgentID, GroupID, Quaternion.Zero);
|
||||
}
|
||||
/// <summary>
|
||||
/// Duplicate the given object.
|
||||
/// </summary>
|
||||
/// <param name="originalPrim"></param>
|
||||
/// <param name="offset"></param>
|
||||
/// <param name="flags"></param>
|
||||
protected internal SceneObjectGroup DuplicateObject(uint originalPrim, LLVector3 offset, uint flags, LLUUID AgentID, LLUUID GroupID, Quaternion rot)
|
||||
{
|
||||
//m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID);
|
||||
|
||||
List<EntityBase> EntityList = GetEntities();
|
||||
|
||||
SceneObjectGroup originPrim = null;
|
||||
@@ -1445,16 +1457,22 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
m_numPrim += copy.Children.Count;
|
||||
|
||||
if (rot != Quaternion.Zero)
|
||||
{
|
||||
copy.UpdateGroupRotation(new LLQuaternion(rot.x, rot.y, rot.z, rot.w));
|
||||
}
|
||||
|
||||
copy.StartScripts();
|
||||
copy.ScheduleGroupForFullUpdate();
|
||||
return copy;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.WarnFormat("[SCENE]: Attempted to duplicate nonexistant prim id {0}", GroupID);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calculates the distance between two Vector3s
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user