aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs5
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs22
4 files changed, 31 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index b7f4303..29a6478 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -328,7 +328,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
328 if (!Enabled) 328 if (!Enabled)
329 return false; 329 return false;
330 330
331 return AttachObjectInternal(sp, group, attachmentPt, silent, addToInventory, true, append); 331 return AttachObjectInternal(sp, group, attachmentPt, silent, addToInventory, false, append);
332 } 332 }
333 333
334 /// <summary> 334 /// <summary>
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 5337835..911a3e4 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2739,7 +2739,10 @@ namespace OpenSim.Region.Framework.Scenes
2739// "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition); 2739// "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition);
2740 2740
2741 RootPrim.RemFlag(PrimFlags.TemporaryOnRez); 2741 RootPrim.RemFlag(PrimFlags.TemporaryOnRez);
2742 2742
2743 // We must currently not resume scripts at this stage since AttachmentsModule does not have the
2744 // information that this is due to a teleport/border cross rather than an ordinary attachment.
2745 // We currently do this in Scene.MakeRootAgent() instead.
2743 if (AttachmentsModule != null) 2746 if (AttachmentsModule != null)
2744 AttachmentsModule.AttachObject(sp, grp, 0, false, false, true); 2747 AttachmentsModule.AttachObject(sp, grp, 0, false, false, true);
2745 } 2748 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 27325c5..847df03 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -3203,6 +3203,10 @@ namespace OpenSim.Region.Framework.Scenes
3203 /// <param name="events"></param> 3203 /// <param name="events"></param>
3204 public void SetScriptEvents(UUID scriptid, int events) 3204 public void SetScriptEvents(UUID scriptid, int events)
3205 { 3205 {
3206// m_log.DebugFormat(
3207// "[SCENE OBJECT PART]: Set script events for script with id {0} on {1}/{2} to {3} in {4}",
3208// scriptid, Name, ParentGroup.Name, events, ParentGroup.Scene.Name);
3209
3206 // scriptEvents oldparts; 3210 // scriptEvents oldparts;
3207 lock (m_scriptEvents) 3211 lock (m_scriptEvents)
3208 { 3212 {
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 6591fef..4930a39 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -968,6 +968,28 @@ namespace OpenSim.Region.Framework.Scenes
968 Scene.AttachmentsModule.RezAttachments(this); 968 Scene.AttachmentsModule.RezAttachments(this);
969 }); 969 });
970 } 970 }
971 else
972 {
973 // We need to restart scripts here so that they receive the correct changed events (CHANGED_TELEPORT
974 // and CHANGED_REGION) when the attachments have been rezzed in the new region. This cannot currently
975 // be done in AttachmentsModule.CopyAttachments(AgentData ad, IScenePresence sp) itself since we are
976 // not transporting the required data.
977 lock (m_attachments)
978 {
979 if (HasAttachments())
980 {
981 m_log.DebugFormat(
982 "[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name);
983
984 // Resume scripts
985 foreach (SceneObjectGroup sog in m_attachments)
986 {
987 sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource());
988 sog.ResumeScripts();
989 }
990 }
991 }
992 }
971 993
972 // send the animations of the other presences to me 994 // send the animations of the other presences to me
973 m_scene.ForEachRootScenePresence(delegate(ScenePresence presence) 995 m_scene.ForEachRootScenePresence(delegate(ScenePresence presence)