diff options
author | Melanie | 2013-03-29 02:42:47 +0000 |
---|---|---|
committer | Melanie | 2013-03-29 02:42:47 +0000 |
commit | f2f824817814d9eeaddf29be2732f25fa708e05b (patch) | |
tree | 37a7e54d2873ebbb92c0a907383bbfcd52c542b5 /OpenSim/Region | |
parent | Merge commit 'e89bcf4f773d95492b168376599f7530a6044e8f' into careminster (diff) | |
parent | Fix bug where CHANGED_REGION and/or CHANGED_TELEPORT weren't firing for scrip... (diff) | |
download | opensim-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 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 25 |
3 files changed, 33 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 94ead98..28fce53 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2861,7 +2861,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2861 | // "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition); | 2861 | // "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition); |
2862 | 2862 | ||
2863 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); | 2863 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); |
2864 | 2864 | ||
2865 | // We must currently not resume scripts at this stage since AttachmentsModule does not have the | ||
2866 | // information that this is due to a teleport/border cross rather than an ordinary attachment. | ||
2867 | // We currently do this in Scene.MakeRootAgent() instead. | ||
2865 | if (AttachmentsModule != null) | 2868 | if (AttachmentsModule != null) |
2866 | AttachmentsModule.AttachObject(sp, grp, 0, false, false, false, true); | 2869 | AttachmentsModule.AttachObject(sp, grp, 0, false, false, false, true); |
2867 | } | 2870 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 9265805..6839614 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -3743,6 +3743,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
3743 | /// <param name="events"></param> | 3743 | /// <param name="events"></param> |
3744 | public void SetScriptEvents(UUID scriptid, int events) | 3744 | public void SetScriptEvents(UUID scriptid, int events) |
3745 | { | 3745 | { |
3746 | // m_log.DebugFormat( | ||
3747 | // "[SCENE OBJECT PART]: Set script events for script with id {0} on {1}/{2} to {3} in {4}", | ||
3748 | // scriptid, Name, ParentGroup.Name, events, ParentGroup.Scene.Name); | ||
3749 | |||
3746 | // scriptEvents oldparts; | 3750 | // scriptEvents oldparts; |
3747 | lock (m_scriptEvents) | 3751 | lock (m_scriptEvents) |
3748 | { | 3752 | { |
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 | ||