diff options
author | AliciaRaven | 2015-05-26 00:38:07 +0100 |
---|---|---|
committer | Diva Canto | 2015-05-26 15:05:32 -0700 |
commit | 5e09e52ee99a1646abbf83a4bf8d57655241d2f5 (patch) | |
tree | 0668be9b22ccdcfb8a6c7b70811283a987b836cc /OpenSim | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-5e09e52ee99a1646abbf83a4bf8d57655241d2f5.zip opensim-SC-5e09e52ee99a1646abbf83a4bf8d57655241d2f5.tar.gz opensim-SC-5e09e52ee99a1646abbf83a4bf8d57655241d2f5.tar.bz2 opensim-SC-5e09e52ee99a1646abbf83a4bf8d57655241d2f5.tar.xz |
Attachments Module. Fix detach event not being fired until the next time the object is attached.
Not an ideal fix but this allows scripts such as AOs to remove animations when detached etc. The pause added does not affect other avatars or the scene in general and only pauses the avatar performing the detach for an extra 2 milliseconds.
Signed-off-by: Diva Canto <diva@metaverseink.com>
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 8705dd5..77abcd7 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -929,8 +929,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
929 | private string PrepareScriptInstanceForSave(SceneObjectGroup grp, bool fireDetachEvent) | 929 | private string PrepareScriptInstanceForSave(SceneObjectGroup grp, bool fireDetachEvent) |
930 | { | 930 | { |
931 | if (fireDetachEvent) | 931 | if (fireDetachEvent) |
932 | { | ||
932 | m_scene.EventManager.TriggerOnAttach(grp.LocalId, grp.FromItemID, UUID.Zero); | 933 | m_scene.EventManager.TriggerOnAttach(grp.LocalId, grp.FromItemID, UUID.Zero); |
933 | 934 | ||
935 | // Allow detach event time to do some work before stopping the script | ||
936 | Thread.Sleep(2); | ||
937 | } | ||
938 | |||
934 | using (StringWriter sw = new StringWriter()) | 939 | using (StringWriter sw = new StringWriter()) |
935 | { | 940 | { |
936 | using (XmlTextWriter writer = new XmlTextWriter(sw)) | 941 | using (XmlTextWriter writer = new XmlTextWriter(sw)) |