aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs26
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs4
2 files changed, 30 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 80f9114..904e38a 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -43,6 +43,10 @@ namespace OpenSim.Region.Framework.Scenes
43 43
44 public delegate void ObjectDuplicateDelegate(EntityBase original, EntityBase clone); 44 public delegate void ObjectDuplicateDelegate(EntityBase original, EntityBase clone);
45 45
46 public delegate void AttachToBackupDelegate(SceneObjectGroup sog);
47
48 public delegate void DetachFromBackupDelegate(SceneObjectGroup sog);
49
46 public delegate void ObjectCreateDelegate(EntityBase obj); 50 public delegate void ObjectCreateDelegate(EntityBase obj);
47 51
48 public delegate void ObjectDeleteDelegate(EntityBase obj); 52 public delegate void ObjectDeleteDelegate(EntityBase obj);
@@ -61,6 +65,8 @@ namespace OpenSim.Region.Framework.Scenes
61 private PhysicsCrash handlerPhysicsCrash = null; 65 private PhysicsCrash handlerPhysicsCrash = null;
62 66
63 public event ObjectDuplicateDelegate OnObjectDuplicate; 67 public event ObjectDuplicateDelegate OnObjectDuplicate;
68 public event AttachToBackupDelegate OnAttachToBackup;
69 public event DetachFromBackupDelegate OnDetachFromBackup;
64 public event ObjectCreateDelegate OnObjectCreate; 70 public event ObjectCreateDelegate OnObjectCreate;
65 public event ObjectDeleteDelegate OnObjectRemove; 71 public event ObjectDeleteDelegate OnObjectRemove;
66 72
@@ -388,10 +394,14 @@ namespace OpenSim.Region.Framework.Scenes
388 m_numPrim += sceneObject.Children.Count; 394 m_numPrim += sceneObject.Children.Count;
389 395
390 if (attachToBackup) 396 if (attachToBackup)
397 {
391 sceneObject.AttachToBackup(); 398 sceneObject.AttachToBackup();
399 }
392 400
393 if (OnObjectCreate != null) 401 if (OnObjectCreate != null)
402 {
394 OnObjectCreate(sceneObject); 403 OnObjectCreate(sceneObject);
404 }
395 405
396 lock (m_dictionary_lock) 406 lock (m_dictionary_lock)
397 { 407 {
@@ -458,6 +468,22 @@ namespace OpenSim.Region.Framework.Scenes
458 } 468 }
459 } 469 }
460 470
471 public void FireAttachToBackup(SceneObjectGroup obj)
472 {
473 if (OnAttachToBackup != null)
474 {
475 OnAttachToBackup(obj);
476 }
477 }
478
479 public void FireDetachFromBackup(SceneObjectGroup obj)
480 {
481 if (OnDetachFromBackup != null)
482 {
483 OnDetachFromBackup(obj);
484 }
485 }
486
461 /// <summary> 487 /// <summary>
462 /// Process all pending updates 488 /// Process all pending updates
463 /// </summary> 489 /// </summary>
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 3e92954..e18dfd2 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -658,6 +658,8 @@ namespace OpenSim.Region.Framework.Scenes
658 /// </summary> 658 /// </summary>
659 public virtual void AttachToBackup() 659 public virtual void AttachToBackup()
660 { 660 {
661 m_scene.SceneGraph.FireAttachToBackup(this);
662
661 if (InSceneBackup) 663 if (InSceneBackup)
662 { 664 {
663 //m_log.DebugFormat( 665 //m_log.DebugFormat(
@@ -2703,6 +2705,8 @@ namespace OpenSim.Region.Framework.Scenes
2703 /// <param name="objectGroup"></param> 2705 /// <param name="objectGroup"></param>
2704 public virtual void DetachFromBackup() 2706 public virtual void DetachFromBackup()
2705 { 2707 {
2708 m_scene.SceneGraph.FireDetachFromBackup(this);
2709
2706 if (m_isBackedUp) 2710 if (m_isBackedUp)
2707 m_scene.EventManager.OnBackup -= ProcessBackup; 2711 m_scene.EventManager.OnBackup -= ProcessBackup;
2708 2712