diff options
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 70d9f23..eca9c3b 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -755,6 +755,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
755 | if (tainted) | 755 | if (tainted) |
756 | objatt.HasGroupChanged = true; | 756 | objatt.HasGroupChanged = true; |
757 | 757 | ||
758 | if (doc != null) | ||
759 | { | ||
760 | objatt.LoadScriptState(doc); | ||
761 | objatt.ResetOwnerChangeFlag(); | ||
762 | } | ||
763 | |||
758 | // Fire after attach, so we don't get messy perms dialogs | 764 | // Fire after attach, so we don't get messy perms dialogs |
759 | // 4 == AttachedRez | 765 | // 4 == AttachedRez |
760 | objatt.CreateScriptInstances(0, true, m_scene.DefaultScriptEngine, 4); | 766 | objatt.CreateScriptInstances(0, true, m_scene.DefaultScriptEngine, 4); |
@@ -771,20 +777,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
771 | "[ATTACHMENTS MODULE]: Could not retrieve item {0} for attaching to avatar {1} at point {2}", | 777 | "[ATTACHMENTS MODULE]: Could not retrieve item {0} for attaching to avatar {1} at point {2}", |
772 | itemID, sp.Name, attachmentPt); | 778 | itemID, sp.Name, attachmentPt); |
773 | } | 779 | } |
774 | |||
775 | if (doc != null) | ||
776 | { | ||
777 | objatt.LoadScriptState(doc); | ||
778 | objatt.ResetOwnerChangeFlag(); | ||
779 | } | ||
780 | |||
781 | // Fire after attach, so we don't get messy perms dialogs | ||
782 | // 4 == AttachedRez | ||
783 | objatt.CreateScriptInstances(0, true, m_scene.DefaultScriptEngine, 4); | ||
784 | objatt.ResumeScripts(); | ||
785 | |||
786 | // Do this last so that event listeners have access to all the effects of the attachment | ||
787 | m_scene.EventManager.TriggerOnAttach(objatt.LocalId, itemID, sp.UUID); | ||
788 | } | 780 | } |
789 | } | 781 | } |
790 | 782 | ||