diff options
author | Charles Krinke | 2008-07-04 00:59:38 +0000 |
---|---|---|
committer | Charles Krinke | 2008-07-04 00:59:38 +0000 |
commit | ce5122ebf3077085d1ca6967634b4e0baad94d6c (patch) | |
tree | c65aa10649c677a9f2a39421c2c99d5a4857bc63 /OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |
parent | Mantis#1660. Thank you, kindly, Melanie for a patch that: (diff) | |
download | opensim-SC-ce5122ebf3077085d1ca6967634b4e0baad94d6c.zip opensim-SC-ce5122ebf3077085d1ca6967634b4e0baad94d6c.tar.gz opensim-SC-ce5122ebf3077085d1ca6967634b4e0baad94d6c.tar.bz2 opensim-SC-ce5122ebf3077085d1ca6967634b4e0baad94d6c.tar.xz |
Mantis#1659. Thank you, Melanie for a patch that:
In LSL, the state command should have an immediate effect.
The OpenSim script engine seems to wait until the function
ends to process the state transition.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine/XEngine.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 67 |
1 files changed, 36 insertions, 31 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 5e3b91a..cbc5112 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -1296,44 +1296,49 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1296 | catch (Exception e) | 1296 | catch (Exception e) |
1297 | { | 1297 | { |
1298 | m_InEvent = false; | 1298 | m_InEvent = false; |
1299 | if (e is System.Threading.ThreadAbortException) | 1299 | m_CurrentEvent = String.Empty; |
1300 | |||
1301 | if (!(e is TargetInvocationException) || !(e.InnerException is EventAbortException)) | ||
1300 | { | 1302 | { |
1301 | lock (m_EventQueue) | 1303 | if (e is System.Threading.ThreadAbortException) |
1302 | { | 1304 | { |
1303 | if ((m_EventQueue.Count > 0) && m_RunEvents) | 1305 | lock (m_EventQueue) |
1304 | { | 1306 | { |
1305 | m_CurrentResult=m_Engine.QueueEventHandler(this); | 1307 | if ((m_EventQueue.Count > 0) && m_RunEvents) |
1306 | } | 1308 | { |
1307 | else | 1309 | m_CurrentResult=m_Engine.QueueEventHandler(this); |
1308 | { | 1310 | } |
1309 | m_CurrentResult = null; | 1311 | else |
1312 | { | ||
1313 | m_CurrentResult = null; | ||
1314 | } | ||
1310 | } | 1315 | } |
1311 | } | ||
1312 | 1316 | ||
1313 | m_DetectParams = null; | 1317 | m_DetectParams = null; |
1314 | 1318 | ||
1315 | return 0; | 1319 | return 0; |
1316 | } | 1320 | } |
1317 | 1321 | ||
1318 | try | 1322 | try |
1319 | { | 1323 | { |
1320 | // DISPLAY ERROR INWORLD | 1324 | // DISPLAY ERROR INWORLD |
1321 | string text = "Runtime error:\n" + e.ToString(); | 1325 | string text = "Runtime error:\n" + e.ToString(); |
1322 | if (text.Length > 1400) | 1326 | if (text.Length > 1400) |
1323 | text = text.Substring(0, 1400); | 1327 | text = text.Substring(0, 1400); |
1324 | m_Engine.World.SimChat(Helpers.StringToField(text), | 1328 | m_Engine.World.SimChat(Helpers.StringToField(text), |
1325 | ChatTypeEnum.DebugChannel, 2147483647, | 1329 | ChatTypeEnum.DebugChannel, 2147483647, |
1326 | part.AbsolutePosition, | 1330 | part.AbsolutePosition, |
1327 | part.Name, part.UUID, false); | 1331 | part.Name, part.UUID, false); |
1328 | } | 1332 | } |
1329 | catch (Exception e2) // LEGIT: User Scripting | 1333 | catch (Exception e2) // LEGIT: User Scripting |
1330 | { | 1334 | { |
1331 | m_Engine.Log.Error("[XEngine]: "+ | 1335 | m_Engine.Log.Error("[XEngine]: "+ |
1332 | "Error displaying error in-world: " + | 1336 | "Error displaying error in-world: " + |
1333 | e2.ToString()); | 1337 | e2.ToString()); |
1334 | m_Engine.Log.Error("[XEngine]: " + | 1338 | m_Engine.Log.Error("[XEngine]: " + |
1335 | "Errormessage: Error compiling script:\r\n" + | 1339 | "Errormessage: Error compiling script:\r\n" + |
1336 | e.ToString()); | 1340 | e.ToString()); |
1341 | } | ||
1337 | } | 1342 | } |
1338 | } | 1343 | } |
1339 | } | 1344 | } |