diff options
author | Justin Clark-Casey (justincc) | 2010-07-28 19:38:20 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-07-28 19:38:20 +0100 |
commit | f067f733ea60cc821d51889871f1f8d476aebd76 (patch) | |
tree | 2bc9608c37dd5d19d2cf2b00280fb177e7d83625 /OpenSim | |
parent | relocate moap specific cloning code to MoapModule (diff) | |
download | opensim-SC_OLD-f067f733ea60cc821d51889871f1f8d476aebd76.zip opensim-SC_OLD-f067f733ea60cc821d51889871f1f8d476aebd76.tar.gz opensim-SC_OLD-f067f733ea60cc821d51889871f1f8d476aebd76.tar.bz2 opensim-SC_OLD-f067f733ea60cc821d51889871f1f8d476aebd76.tar.xz |
add userExposed parameter to part copy event
Diffstat (limited to 'OpenSim')
4 files changed, 14 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs index f4814ce..e9d723b 100644 --- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs +++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs | |||
@@ -266,7 +266,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
266 | } | 266 | } |
267 | } | 267 | } |
268 | 268 | ||
269 | protected void OnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original) | 269 | protected void OnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed) |
270 | { | 270 | { |
271 | if (original.Shape.Media != null) | 271 | if (original.Shape.Media != null) |
272 | { | 272 | { |
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 | |||
354 | /// <summary> | 354 | /// <summary> |
355 | /// Called when a scene object part is cloned within the region. | 355 | /// Called when a scene object part is cloned within the region. |
356 | /// </summary> | 356 | /// </summary> |
357 | /// <param name="copy"></param> | ||
358 | /// <param name="original"></param> | ||
359 | /// <param name="userExposed">True if the duplicate will immediately be in the scene, false otherwise</param> | ||
357 | public event SceneObjectPartCopyDelegate OnSceneObjectPartCopy; | 360 | public event SceneObjectPartCopyDelegate OnSceneObjectPartCopy; |
358 | public delegate void SceneObjectPartCopyDelegate(SceneObjectPart copy, SceneObjectPart original); | 361 | public delegate void SceneObjectPartCopyDelegate(SceneObjectPart copy, SceneObjectPart original, bool userExposed); |
359 | 362 | ||
360 | public delegate void RegionUp(GridRegion region); | 363 | public delegate void RegionUp(GridRegion region); |
361 | public event RegionUp OnRegionUp; | 364 | public event RegionUp OnRegionUp; |
@@ -2081,7 +2084,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2081 | } | 2084 | } |
2082 | } | 2085 | } |
2083 | 2086 | ||
2084 | public void TriggerOnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original) | 2087 | public void TriggerOnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed) |
2085 | { | 2088 | { |
2086 | SceneObjectPartCopyDelegate handler = OnSceneObjectPartCopy; | 2089 | SceneObjectPartCopyDelegate handler = OnSceneObjectPartCopy; |
2087 | if (handler != null) | 2090 | if (handler != null) |
@@ -2090,7 +2093,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2090 | { | 2093 | { |
2091 | try | 2094 | try |
2092 | { | 2095 | { |
2093 | d(copy, original); | 2096 | d(copy, original, userExposed); |
2094 | } | 2097 | } |
2095 | catch (Exception e) | 2098 | catch (Exception e) |
2096 | { | 2099 | { |
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 | |||
1528 | /// <summary> | 1528 | /// <summary> |
1529 | /// Duplicates this object, including operations such as physics set up and attaching to the backup event. | 1529 | /// Duplicates this object, including operations such as physics set up and attaching to the backup event. |
1530 | /// </summary> | 1530 | /// </summary> |
1531 | /// <param name="userExposed">True if the duplicate will immediately be in the scene, false otherwise</param> | ||
1531 | /// <returns></returns> | 1532 | /// <returns></returns> |
1532 | public SceneObjectGroup Copy(bool userExposed) | 1533 | public SceneObjectGroup Copy(bool userExposed) |
1533 | { | 1534 | { |
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 | |||
1554 | /// <summary> | 1554 | /// <summary> |
1555 | /// Duplicates this part. | 1555 | /// Duplicates this part. |
1556 | /// </summary> | 1556 | /// </summary> |
1557 | /// <param name="localID"></param> | ||
1558 | /// <param name="AgentID"></param> | ||
1559 | /// <param name="GroupID"></param> | ||
1560 | /// <param name="linkNum"></param> | ||
1561 | /// <param name="userExposed">True if the duplicate will immediately be in the scene, false otherwise</param> | ||
1557 | /// <returns></returns> | 1562 | /// <returns></returns> |
1558 | public SceneObjectPart Copy(uint localID, UUID AgentID, UUID GroupID, int linkNum, bool userExposed) | 1563 | public SceneObjectPart Copy(uint localID, UUID AgentID, UUID GroupID, int linkNum, bool userExposed) |
1559 | { | 1564 | { |
@@ -1617,7 +1622,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1617 | dupe.DoPhysicsPropertyUpdate(UsePhysics, true); | 1622 | dupe.DoPhysicsPropertyUpdate(UsePhysics, true); |
1618 | } | 1623 | } |
1619 | 1624 | ||
1620 | ParentGroup.Scene.EventManager.TriggerOnSceneObjectPartCopy(dupe, this); | 1625 | ParentGroup.Scene.EventManager.TriggerOnSceneObjectPartCopy(dupe, this, userExposed); |
1621 | 1626 | ||
1622 | // m_log.DebugFormat("[SCENE OBJECT PART]: Clone of {0} {1} finished", Name, UUID); | 1627 | // m_log.DebugFormat("[SCENE OBJECT PART]: Clone of {0} {1} finished", Name, UUID); |
1623 | 1628 | ||