diff options
Diffstat (limited to 'OpenSim/Region')
-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()); |