diff options
author | Tom Grimshaw | 2010-06-25 14:25:39 -0700 |
---|---|---|
committer | Tom Grimshaw | 2010-06-25 14:25:39 -0700 |
commit | 96e649189f24b6261d0bcdd6aa7f5a078b8d3f7f (patch) | |
tree | bb6a58fa723f70a7633fd62ddf6bd1d349964228 /OpenSim/Region/Framework/Scenes/SceneGraph.cs | |
parent | Remove the prepending slash from the default git repo name (diff) | |
download | opensim-SC_OLD-96e649189f24b6261d0bcdd6aa7f5a078b8d3f7f.zip opensim-SC_OLD-96e649189f24b6261d0bcdd6aa7f5a078b8d3f7f.tar.gz opensim-SC_OLD-96e649189f24b6261d0bcdd6aa7f5a078b8d3f7f.tar.bz2 opensim-SC_OLD-96e649189f24b6261d0bcdd6aa7f5a078b8d3f7f.tar.xz |
Add two events: OnAttachToBackup and OnDetachFromBackup.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 26 |
1 files changed, 26 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> |