diff options
author | Justin Clark-Casey (justincc) | 2012-07-10 22:41:11 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-07-10 22:41:11 +0100 |
commit | f3134b5cf688af9b824880e0221072b24d22f33e (patch) | |
tree | 94ac27ba4fd2f7f0700cc626005d20d7c6465881 /OpenSim/Region/Framework/Scenes/Scene.cs | |
parent | If a script is being stopped manually, then give the scriptpool thread 1 seco... (diff) | |
download | opensim-SC-f3134b5cf688af9b824880e0221072b24d22f33e.zip opensim-SC-f3134b5cf688af9b824880e0221072b24d22f33e.tar.gz opensim-SC-f3134b5cf688af9b824880e0221072b24d22f33e.tar.bz2 opensim-SC-f3134b5cf688af9b824880e0221072b24d22f33e.tar.xz |
When an attachment is detached to inv or derezzed, stop the scripts, update the known item with script state still in the script engine and then remove the scripts.
This is to fix a regression starting from 5301648 where attachments had to start being deleted before persistence in order to avoid race conditions with hud update threads.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index ec911a5..25223b9 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2183,13 +2183,30 @@ namespace OpenSim.Region.Framework.Scenes | |||
2183 | /// <summary> | 2183 | /// <summary> |
2184 | /// Synchronously delete the given object from the scene. | 2184 | /// Synchronously delete the given object from the scene. |
2185 | /// </summary> | 2185 | /// </summary> |
2186 | /// <remarks> | ||
2187 | /// Scripts are also removed. | ||
2188 | /// </remarks> | ||
2186 | /// <param name="group">Object Id</param> | 2189 | /// <param name="group">Object Id</param> |
2187 | /// <param name="silent">Suppress broadcasting changes to other clients.</param> | 2190 | /// <param name="silent">Suppress broadcasting changes to other clients.</param> |
2188 | public void DeleteSceneObject(SceneObjectGroup group, bool silent) | 2191 | public void DeleteSceneObject(SceneObjectGroup group, bool silent) |
2192 | { | ||
2193 | DeleteSceneObject(group, silent, true); | ||
2194 | } | ||
2195 | |||
2196 | /// <summary> | ||
2197 | /// Synchronously delete the given object from the scene. | ||
2198 | /// </summary> | ||
2199 | /// <param name="group">Object Id</param> | ||
2200 | /// <param name="silent">Suppress broadcasting changes to other clients.</param> | ||
2201 | /// <param name="removeScripts">If true, then scripts are removed. If false, then they are only stopped.</para> | ||
2202 | public void DeleteSceneObject(SceneObjectGroup group, bool silent, bool removeScripts) | ||
2189 | { | 2203 | { |
2190 | // m_log.DebugFormat("[SCENE]: Deleting scene object {0} {1}", group.Name, group.UUID); | 2204 | // m_log.DebugFormat("[SCENE]: Deleting scene object {0} {1}", group.Name, group.UUID); |
2191 | 2205 | ||
2192 | group.RemoveScriptInstances(true); | 2206 | if (removeScripts) |
2207 | group.RemoveScriptInstances(true); | ||
2208 | else | ||
2209 | group.StopScriptInstances(); | ||
2193 | 2210 | ||
2194 | SceneObjectPart[] partList = group.Parts; | 2211 | SceneObjectPart[] partList = group.Parts; |
2195 | 2212 | ||