diff options
author | root | 2009-12-22 03:22:33 +0100 |
---|---|---|
committer | root | 2009-12-22 03:22:33 +0100 |
commit | 69b551c51686bca58c478f517f6ccfa561ad9730 (patch) | |
tree | 605c126a50687f5f699d30296b746e8f19cdfebf /OpenSim/Region/Framework/Scenes | |
parent | Merge branch 'master' into careminster (diff) | |
download | opensim-SC-69b551c51686bca58c478f517f6ccfa561ad9730.zip opensim-SC-69b551c51686bca58c478f517f6ccfa561ad9730.tar.gz opensim-SC-69b551c51686bca58c478f517f6ccfa561ad9730.tar.bz2 opensim-SC-69b551c51686bca58c478f517f6ccfa561ad9730.tar.xz |
Allow 100ms for scripts to run attach(NULL_KEY) on detach
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index f74fd5d..e875525 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -542,6 +542,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
542 | if (group.GetFromItemID() == itemID) | 542 | if (group.GetFromItemID() == itemID) |
543 | { | 543 | { |
544 | m_parentScene.SendAttachEvent(group.LocalId, itemID, UUID.Zero); | 544 | m_parentScene.SendAttachEvent(group.LocalId, itemID, UUID.Zero); |
545 | bool hasScripts = false; | ||
546 | foreach (SceneObjectPart part in group.Children) | ||
547 | { | ||
548 | if (part..Inventory.ContainsScripts()) | ||
549 | { | ||
550 | hasScripts = true; | ||
551 | break; | ||
552 | } | ||
553 | } | ||
554 | |||
555 | if (hasScripts) // Allow the object to execute the attach(NULL_KEY) event | ||
556 | System.Threading.Thread.Sleep(100); | ||
545 | group.DetachToInventoryPrep(); | 557 | group.DetachToInventoryPrep(); |
546 | m_log.Debug("[DETACH]: Saving attachpoint: " + | 558 | m_log.Debug("[DETACH]: Saving attachpoint: " + |
547 | ((uint)group.GetAttachmentPoint()).ToString()); | 559 | ((uint)group.GetAttachmentPoint()).ToString()); |