From 8a93358405ba97697ece87887d2a36fadfeaca4f Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Tue, 10 Jun 2008 00:18:00 +0000 Subject: * This completes ObjectDuplicateOnRay. * In English, that means that Copy Selection works now, including Copy Centers and Copy Rotates. --- OpenSim/Region/Environment/Scenes/InnerScene.cs | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/InnerScene.cs') diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index d7a6d5b..3cd32c6 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs @@ -1399,7 +1399,7 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// Duplicate the given object. + /// Duplicate the given object, Fire and Forget, No rotation, no return wrapper /// /// /// @@ -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); + } + /// + /// Duplicate the given object. + /// + /// + /// + /// + 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 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; } - /// /// Calculates the distance between two Vector3s /// -- cgit v1.1