aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorMelanie2013-03-29 02:42:47 +0000
committerMelanie2013-03-29 02:42:47 +0000
commitf2f824817814d9eeaddf29be2732f25fa708e05b (patch)
tree37a7e54d2873ebbb92c0a907383bbfcd52c542b5 /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parentMerge commit 'e89bcf4f773d95492b168376599f7530a6044e8f' into careminster (diff)
parentFix bug where CHANGED_REGION and/or CHANGED_TELEPORT weren't firing for scrip... (diff)
downloadopensim-SC-f2f824817814d9eeaddf29be2732f25fa708e05b.zip
opensim-SC-f2f824817814d9eeaddf29be2732f25fa708e05b.tar.gz
opensim-SC-f2f824817814d9eeaddf29be2732f25fa708e05b.tar.bz2
opensim-SC-f2f824817814d9eeaddf29be2732f25fa708e05b.tar.xz
Merge commit '23ae4c0a4d813763bcc39db7693850a21727d7f2' into careminster
Conflicts: OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs25
1 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index d41325c..f01a916 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1113,6 +1113,31 @@ namespace OpenSim.Region.Framework.Scenes
1113 Scene.AttachmentsModule.RezAttachments(this); 1113 Scene.AttachmentsModule.RezAttachments(this);
1114 }); 1114 });
1115 } 1115 }
1116 else
1117 {
1118 // We need to restart scripts here so that they receive the correct changed events (CHANGED_TELEPORT
1119 // and CHANGED_REGION) when the attachments have been rezzed in the new region. This cannot currently
1120 // be done in AttachmentsModule.CopyAttachments(AgentData ad, IScenePresence sp) itself since we are
1121 // not transporting the required data.
1122 lock (m_attachments)
1123 {
1124 if (HasAttachments())
1125 {
1126 m_log.DebugFormat(
1127 "[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name);
1128
1129 // Resume scripts
1130 Util.FireAndForget(delegate(object x) {
1131 foreach (SceneObjectGroup sog in m_attachments)
1132 {
1133 sog.ScheduleGroupForFullUpdate();
1134 sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource());
1135 sog.ResumeScripts();
1136 }
1137 });
1138 }
1139 }
1140 }
1116 1141
1117 SendAvatarDataToAllAgents(); 1142 SendAvatarDataToAllAgents();
1118 1143