* This completes ObjectDuplicateOnRay.

* In English, that means that Copy Selection works now, including Copy Centers and Copy Rotates.
This commit is contained in:
Teravus Ovares
2008-06-10 00:18:00 +00:00
parent c62f081380
commit 8a93358405
3 changed files with 77 additions and 51 deletions

View File

@@ -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>