diff options
Merge commit '23ae4c0a4d813763bcc39db7693850a21727d7f2' into careminster
Conflicts:
OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 25 |
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 | ||