From 323ffd7a893e76f097487c1ab461923d996dc1ca Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 10 Dec 2011 15:28:32 +0100 Subject: Fix a regression that causes data from the attachments module to fail loading --- .../Avatar/Attachments/AttachmentsModule.cs | 20 ++++++-------------- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 1 + 2 files changed, 7 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 if (tainted) objatt.HasGroupChanged = true; + if (doc != null) + { + objatt.LoadScriptState(doc); + objatt.ResetOwnerChangeFlag(); + } + // Fire after attach, so we don't get messy perms dialogs // 4 == AttachedRez objatt.CreateScriptInstances(0, true, m_scene.DefaultScriptEngine, 4); @@ -771,20 +777,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments "[ATTACHMENTS MODULE]: Could not retrieve item {0} for attaching to avatar {1} at point {2}", itemID, sp.Name, attachmentPt); } - - if (doc != null) - { - objatt.LoadScriptState(doc); - objatt.ResetOwnerChangeFlag(); - } - - // Fire after attach, so we don't get messy perms dialogs - // 4 == AttachedRez - objatt.CreateScriptInstances(0, true, m_scene.DefaultScriptEngine, 4); - objatt.ResumeScripts(); - - // Do this last so that event listeners have access to all the effects of the attachment - m_scene.EventManager.TriggerOnAttach(objatt.LocalId, itemID, sp.UUID); } } diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 8ff804b..4034621 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1058,6 +1058,7 @@ namespace OpenSim.Region.Framework.Scenes if (PhysicsActor != null) isFlying = PhysicsActor.Flying; + m_log.DebugFormat("[SCENE PRESENCCE]: Local teleport, flying = {0}", isFlying); RemoveFromPhysicalScene(); Velocity = Vector3.Zero; CheckLandingPoint(ref pos); -- cgit v1.1