aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-03-29 02:21:38 +0000
committerJustin Clark-Casey (justincc)2013-03-29 02:21:38 +0000
commit23ae4c0a4d813763bcc39db7693850a21727d7f2 (patch)
treec1707918586c71aba48e282ffcd53f0df8cf6e60 /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parentRevert "Try eliminating the pause before auto-reteleporting for a megaregion ... (diff)
downloadopensim-SC_OLD-23ae4c0a4d813763bcc39db7693850a21727d7f2.zip
opensim-SC_OLD-23ae4c0a4d813763bcc39db7693850a21727d7f2.tar.gz
opensim-SC_OLD-23ae4c0a4d813763bcc39db7693850a21727d7f2.tar.bz2
opensim-SC_OLD-23ae4c0a4d813763bcc39db7693850a21727d7f2.tar.xz
Fix bug where CHANGED_REGION and/or CHANGED_TELEPORT weren't firing for scripts in attachments.
This was because the script resumption in AttachmentsModule was firing the attach event instead. Had to reinstate the code in 285bd3a do we can resume the scripts there instead, though the bug existed before its removal. This is to resolve http://opensimulator.org/mantis/view.php?id=6578
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs22
1 files changed, 22 insertions, 0 deletions
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)