From f067f733ea60cc821d51889871f1f8d476aebd76 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 28 Jul 2010 19:38:20 +0100 Subject: add userExposed parameter to part copy event --- OpenSim/Region/Framework/Scenes/EventManager.cs | 9 ++++++--- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 1 + OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 7 ++++++- 3 files changed, 13 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 0a9a29e..0ae3146 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs @@ -354,8 +354,11 @@ namespace OpenSim.Region.Framework.Scenes /// /// Called when a scene object part is cloned within the region. /// + /// + /// + /// True if the duplicate will immediately be in the scene, false otherwise public event SceneObjectPartCopyDelegate OnSceneObjectPartCopy; - public delegate void SceneObjectPartCopyDelegate(SceneObjectPart copy, SceneObjectPart original); + public delegate void SceneObjectPartCopyDelegate(SceneObjectPart copy, SceneObjectPart original, bool userExposed); public delegate void RegionUp(GridRegion region); public event RegionUp OnRegionUp; @@ -2081,7 +2084,7 @@ namespace OpenSim.Region.Framework.Scenes } } - public void TriggerOnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original) + public void TriggerOnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed) { SceneObjectPartCopyDelegate handler = OnSceneObjectPartCopy; if (handler != null) @@ -2090,7 +2093,7 @@ namespace OpenSim.Region.Framework.Scenes { try { - d(copy, original); + d(copy, original, userExposed); } catch (Exception e) { diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index c2f9117..e26e4ae 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1528,6 +1528,7 @@ namespace OpenSim.Region.Framework.Scenes /// /// Duplicates this object, including operations such as physics set up and attaching to the backup event. /// + /// True if the duplicate will immediately be in the scene, false otherwise /// public SceneObjectGroup Copy(bool userExposed) { diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 71ca605..32332f7 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1554,6 +1554,11 @@ namespace OpenSim.Region.Framework.Scenes /// /// Duplicates this part. /// + /// + /// + /// + /// + /// True if the duplicate will immediately be in the scene, false otherwise /// public SceneObjectPart Copy(uint localID, UUID AgentID, UUID GroupID, int linkNum, bool userExposed) { @@ -1617,7 +1622,7 @@ namespace OpenSim.Region.Framework.Scenes dupe.DoPhysicsPropertyUpdate(UsePhysics, true); } - ParentGroup.Scene.EventManager.TriggerOnSceneObjectPartCopy(dupe, this); + ParentGroup.Scene.EventManager.TriggerOnSceneObjectPartCopy(dupe, this, userExposed); // m_log.DebugFormat("[SCENE OBJECT PART]: Clone of {0} {1} finished", Name, UUID); -- cgit v1.1