aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2012-07-20 10:42:54 +0100
committerMelanie2012-07-20 10:42:54 +0100
commitd98c883f86779022132d4547e4f23e0a205c000d (patch)
treeb1fbaa6473b03380d1848647ca31efb4e22b9943
parentMerge branch 'avination' into careminster (diff)
parentFix the order of operations on detach. The object must always be serialized (diff)
downloadopensim-SC_OLD-d98c883f86779022132d4547e4f23e0a205c000d.zip
opensim-SC_OLD-d98c883f86779022132d4547e4f23e0a205c000d.tar.gz
opensim-SC_OLD-d98c883f86779022132d4547e4f23e0a205c000d.tar.bz2
opensim-SC_OLD-d98c883f86779022132d4547e4f23e0a205c000d.tar.xz
Merge branch 'master' into careminster
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs16
1 files changed, 10 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index c679a7b..860bdcd 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -759,18 +759,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
759 m_scene.EventManager.TriggerOnAttach(so.LocalId, so.FromItemID, UUID.Zero); 759 m_scene.EventManager.TriggerOnAttach(so.LocalId, so.FromItemID, UUID.Zero);
760 sp.RemoveAttachment(so); 760 sp.RemoveAttachment(so);
761 761
762 // We can only remove the script instances from the script engine after we've retrieved their xml state
763 // when we update the attachment item.
764 m_scene.DeleteSceneObject(so, false, false);
765
766 // Prepare sog for storage 762 // Prepare sog for storage
767 so.AttachedAvatar = UUID.Zero; 763 so.AttachedAvatar = UUID.Zero;
768 so.RootPart.SetParentLocalId(0); 764 so.RootPart.SetParentLocalId(0);
769 so.IsAttachment = false; 765 so.IsAttachment = false;
770 so.AbsolutePosition = so.RootPart.AttachedPos; 766
767 // We cannot use AbsolutePosition here because that would
768 // attempt to cross the prim as it is detached
769 so.ForEachPart(x => { x.GroupPosition = so.RootPart.AttachedPos; });
771 770
772 UpdateKnownItem(sp, so, true); 771 UpdateKnownItem(sp, so, true);
773 so.RemoveScriptInstances(true); 772
773 // This MUST happen AFTER serialization because it will
774 // either stop or remove the scripts. Both will cause scripts
775 // to be serialized in a stopped state with the true run
776 // state already lost.
777 m_scene.DeleteSceneObject(so, false, true);
774 } 778 }
775 779
776 protected SceneObjectGroup RezSingleAttachmentFromInventoryInternal( 780 protected SceneObjectGroup RezSingleAttachmentFromInventoryInternal(