diff options
author | Melanie Thielker | 2009-04-12 12:03:07 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-04-12 12:03:07 +0000 |
commit | 2864c45678a6e2557b6e2fda294d06cc8bfcec10 (patch) | |
tree | 24d4ad155281339b3f4a313622ffd25d538d5bdb /OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueThreadClass.cs | |
parent | Fix a regression where animations would only be sent if the avatar has (diff) | |
download | opensim-SC_OLD-2864c45678a6e2557b6e2fda294d06cc8bfcec10.zip opensim-SC_OLD-2864c45678a6e2557b6e2fda294d06cc8bfcec10.tar.gz opensim-SC_OLD-2864c45678a6e2557b6e2fda294d06cc8bfcec10.tar.bz2 opensim-SC_OLD-2864c45678a6e2557b6e2fda294d06cc8bfcec10.tar.xz |
Actually remove the script if it tries to remove itself.
Fixes Mantis #2929
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueThreadClass.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueThreadClass.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueThreadClass.cs index 5451df2..425d349 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueThreadClass.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueThreadClass.cs | |||
@@ -168,6 +168,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
168 | 168 | ||
169 | private ScriptEngine lastScriptEngine; | 169 | private ScriptEngine lastScriptEngine; |
170 | private uint lastLocalID; | 170 | private uint lastLocalID; |
171 | private UUID lastItemID; | ||
171 | 172 | ||
172 | // Queue processing thread loop | 173 | // Queue processing thread loop |
173 | private void EventQueueThreadLoop() | 174 | private void EventQueueThreadLoop() |
@@ -201,6 +202,14 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
201 | lastScriptEngine.World.DeleteSceneObject( | 202 | lastScriptEngine.World.DeleteSceneObject( |
202 | part.ParentGroup, false); | 203 | part.ParentGroup, false); |
203 | } | 204 | } |
205 | catch (ScriptDeleteException) // Must delete item | ||
206 | { | ||
207 | SceneObjectPart part = | ||
208 | lastScriptEngine.World.GetSceneObjectPart( | ||
209 | lastLocalID); | ||
210 | if (part != null && part.ParentGroup != null) | ||
211 | part.Inventory.RemoveInventoryItem(lastItemID); | ||
212 | } | ||
204 | catch (Exception e) | 213 | catch (Exception e) |
205 | { | 214 | { |
206 | m_log.ErrorFormat("[{0}]: Exception {1} thrown", ScriptEngineName, e.GetType().ToString()); | 215 | m_log.ErrorFormat("[{0}]: Exception {1} thrown", ScriptEngineName, e.GetType().ToString()); |
@@ -284,6 +293,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
284 | QIS.localID)) | 293 | QIS.localID)) |
285 | { | 294 | { |
286 | lastLocalID = QIS.localID; | 295 | lastLocalID = QIS.localID; |
296 | lastItemID = QIS.itemID; | ||
287 | LastExecutionStarted = DateTime.Now.Ticks; | 297 | LastExecutionStarted = DateTime.Now.Ticks; |
288 | KillCurrentScript = false; | 298 | KillCurrentScript = false; |
289 | InExecution = true; | 299 | InExecution = true; |