diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 22 |
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) |